hugo-WonderMod icon indicating copy to clipboard operation
hugo-WonderMod copied to clipboard

Add integrated image optimization with next-gen image formats

Open wrobelda opened this issue 1 year ago • 0 comments

What does this PR change? What problem does it solve?

This adds responsive image partial, based on the gruvbox's theme, with some additional fixes on my end. Its generates additional image resolutions for both JPEG and WebP and uses those in the figure\img\picture element.

The PR also adapts the markdown image renderer and the figure shortcode to use that partial. It doesn't touch the cover partial, since it already has own code for responsive image, albeit without the WebP generation part. I did not feel confident to adapt its code, considering it is relatively more complex.

Was the change discussed in an issue or in the Discussions before?

Not aware of.

PR Checklist

  • [x] I have enabled maintainer edits for this PR.
  • [x] I have verified that the code works as described/as intended.
  • [x] This change does not include any CDN resources/links.
  • [x] This change does not include any unrelated scripts such as bash and python scripts.
  • [x] This change updates the overridden internal templates from HUGO's repository.

wrobelda avatar May 27 '24 17:05 wrobelda