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

pictures(and others): processing images may loudly or silently fail #225

Closed
davidsneighbour opened this issue Sep 24, 2023 · 0 comments
Closed
Assignees

Comments

@davidsneighbour
Copy link
Owner

davidsneighbour commented Sep 24, 2023

There are several combined issues with the image generation over multiple plugins:

  • pictures
  • social (open graph image)
  • head (favicon generation)
  • shortcodes (figure, gallery)

SVG:
This is not a raster image format that can be processed with Hugo's image processing functions. It's basically a text file containing rules and options that result in an image on a canvas. The only "processing" possible would be "cropping" the canvas proportions of the image or resizing it by adding sizing options to the container.

GIF:
There is no reason to use the GIF format for a static image. These days most of the GIF images are animations. Hugo seems to be unable to process them (how could it?) and either fails loudly or silently, based on processor resources and timeout settings. It leads even if the processing run does not loudly fail to very long processing times, slowing Hugo down.

For this reason, for now, no SVGs and GIFs will be processed and the plugins will, depending on the use case, fail silently with a warning or loudly with a fail to process these formats.

Keep an eye on this space for updates.

Solution ideas:

  • adding dedicated shortcodes for SVG images or options to control a container for the image
  • find out, if the GIF images are animated (how?)
  • make a switch available to push those images through and output them unprocessed but with all the markup the other (or static) images receive
@davidsneighbour davidsneighbour self-assigned this Sep 24, 2023
@davidsneighbour davidsneighbour added state:unconfirmed This issue needs to be reproduced. module:pictures and removed bug module:pictures labels Aug 4, 2024
@github-actions github-actions bot removed the state:unconfirmed This issue needs to be reproduced. label Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant