Automattic / Automattic/jetpack
Enhancement: Utilize WordPress built in image sizes for search results.
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
### Impacted plugin
Jetpack
### What
Use image thumbnails for search result images to improve Core Web Vitals
Provide a filter so I can target image load actions.
### How
Right now when I view my site score on Google Core Web Vitals I am receiving a massive penalty because the images used in Jetpack search are full size. Further, they load whether I have initiated a search or not.
Requiring Jetpack Site Optimization (formerly Photon) for image delivery in search is placing a dependency which in my case I do not wanted or desirable. Many users already have image CDN's running. I use AWS Cloudfront, while many others are using Cloudflare, MaxCDN, ETC.
Further, I do not see a filter, any filter that could be used so I can adjust when the images are loaded/how they are loaded.
If there is such a filter that could be used before the results are rendered to modify the results so I can define that the images loaded are thumbnails, loaded from my CDN, and potentially initiate that load on a search action I would be estatic.
Feature Request / Education
Provide a filter that I can target to manage search image loading.
Create/load thumbnails at the time of search initiation.
Cache thumbnails to the object cache (I use Redis) as they would rarely change.
Contributor guide
Research direction
Start by tracing how Jetpack search result images are loaded and when that loading begins. Compare the current full-size behavior with WordPress built-in image sizes, then determine the filter and thumbnail-loading behavior needed to support CDN delivery, search-triggered loading, and optional object-cache use. Done means search results avoid unnecessary full-size loads and expose a usable image-loading filter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- performance, search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100