WordPress / WordPress/performance
Consider generating fallback JPEG/PNG when a WebP/AVIF is uploaded originally
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 461
- Forks
- 165
- Avg merge
- 11h 12m
- Merged PRs (30d)
- 28
Description
Feature Description
This was raised by @webd-uk in a support forum topic: Open Graph protocol does not support webp.
I thought what was being requested was something that was already implemented (cf. https://github.com/WordPress/performance/issues/2028) where outputting modern image formats is skipped during wp_head for the sake of social providers that don't support them (e.g. Open Graph).
However, the issue is rather if you uploads a WebP or AVIF from the beginning (as WordPress now supports). In this case, the plugin won't need to do anything since a modern image format is the original format. In this case, there's no JPEG/PNG to fall back to render in wp_head.
Perhaps this plugin should support site owners who are already using WebP/AVIF images by generating the JPEG/PNG both for use in wp_head and also for PICTURE element fallbacks.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing handling for modern image formats in wp_head and the PICTURE element fallback behavior. Determine how an originally uploaded WebP or AVIF could produce JPEG/PNG fallbacks for both uses, then verify the behavior with the relevant image and markup tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- performance, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100