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

Images in all of Wagtail’s supported formats #457

Open
thibaudcolas opened this issue Oct 13, 2023 · 2 comments
Open

Images in all of Wagtail’s supported formats #457

thibaudcolas opened this issue Oct 13, 2023 · 2 comments

Comments

@thibaudcolas
Copy link
Member

Currently the bakerydemo only contains JPEGs. I’d like to see at least one example of each format Wagtail supports, to simplify testing things like wagtail/wagtail#10781. For formats that are interchangeable with JPEG we can just change existing images. For formats that aren’t (PNG, GIF, SVG), we’d likely need new visuals, or perhaps new content (all keeping on theme).

As well as making our Wagtail core testing easier, I suspect having mismatched formats will also be a more realistic representation of real-world content.

I don’t think this is a must but we could also include:

  • Format conversion in image template tags.
  • Examples of using images "lossless". Ideally only in a part of the site where this is indeed appropriate for a site (so not on a decorative image)
@thibaudcolas
Copy link
Member Author

We now have format conversions in #465. And I’ve realised as well as SVG images we’re also lacking preserve-svg usage (wagtail#12285).

@Morsey187
Copy link
Contributor

I've opened a PR for this issue here #506, although there are two unresolved problems however.

  1. Finding a lightweight and contextually appropriate free to use giff.

Issue described in the current PR here #506 (comment)

  1. Supporting SVGs.

I ran into the issue referenced above (although closed in favor of wagtail/wagtail#11570), when trying to add SVG support, the issue will first need to be resolved in Wagtail before being added to the bakerydemo, without needing to regress current usage of image tags to work around open issues. e.g. not having to convert {% picture author.image format-{avif,webp,jpeg} fill-50x50-c100 preserve-svg to {% picture author.image format-jpeg fill-50x50-c100 preserve-svg

Adding SVG support to bakery, also requires some thought around how to extend/populate the sites data with SVGs whilst staying on theme, I would suggest adding the following SVGs as an ImageBlock on a recipe page and along with a new Author snippet.

Example Screenshot 2024-09-16 at 10 35 18 Screenshot 2024-09-12 at 16 41 03

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

2 participants