Caveats
SVG Files
Imgix does not support rasterizing .svg inputs by default. You will need to contact Imgix to enable this feature for your source. The plugin still adds transform query parameters to .svg files regardless of this setting.
See the Imgix blog post on SVG support for more details.
PDF Files
By default, PDFs are skipped by skipTransform and served from your filesystem directly.
If you override skipTransform to include PDFs, the plugin handles them as follows:
- No transform applied: served with
rasterize-bypassset totrue(original PDF unchanged via imgix CDN) - Transform applied: Imgix rasterizes the PDF and applies the transform, allowing image thumbnails of PDF pages
twig
{# Serve original PDF (default: served from filesystem, not Imgix) #}
<a href="{{ pdfAsset.url }}">Download PDF</a>
{# To generate a thumbnail, skipTransform must allow PDFs through #}
{% do pdfAsset.setTransform({ width: 300 }) %}
<img src="{{ pdfAsset.url }}" alt="PDF preview">