Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image optimisation with SVG images exempt #12

Open
graeme-a-stewart opened this issue Mar 15, 2024 · 1 comment
Open

Image optimisation with SVG images exempt #12

graeme-a-stewart opened this issue Mar 15, 2024 · 1 comment

Comments

@graeme-a-stewart
Copy link
Collaborator

We had to disable the image optimisation (disableImageOptimization: true) because SVG images cannot be rescaled.

Image handling needs to be fixed so that it doesn't try to optimise SVG image (which involves resizing and doesn't work).

@graeme-a-stewart
Copy link
Collaborator Author

I have had some partial success here. In figure.html change L27 from

          {{ if $disableImageOptimization }}

to

           {{ if or $disableImageOptimization (eq .MediaType.SubType "svg") }}

However, also the Blowfish layouts/_default/_markup/render-image.html needs to be fixed. But doing this and moving the fragment into our own layouts area isn't working - somehow the snippet is always loading from the theme. Very annoying...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant