Automattic / Automattic/jetpack
Enhancement: Image Optimizer is too aggressive for some images
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
### Impacted plugin
None / Other
### What
While using the Cover block, I'd like the background image to not be compressed as much (or not at all)
### How
Context
I thought I had found a bug. I have a Cover block with a background image (2560px width) and the size is set to "full size". Looks good in the editor, but on the frontend, the compression is terrible. See example below. Look closely at the shirt (you might have to open the images). The compression is more obvious the larger the image.
| compressed | Jetpack compression off |
|--------|--------|
|  |  |
As a result, I had to turn off image compression, but that affects all images on the site. I think Jetpack is miscalculating the size of the background image and Jetpack doesn't know that the image gets bigger as the viewport is enlarged. The image is an `img` element, not a CSS background-image.
Snippet
```

Building Trust in Web Hosting
The Secure Hosting Alliance (SHA) is revolutionizing the web hosting industry by establishing the standards that truly matter.
Scroll to read more
```
Contributor guide
Research direction
Reproduce the reported quality loss with the WordPress Cover block using a large full-size background image, comparing the frontend result with Jetpack compression disabled. Trace how the image optimizer handles the Cover block's img element; done means preserving better quality for this background image without disabling compression for all site images.
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