Automattic / Automattic/jetpack

Photon: disable intermediate image sizes issues

Open
#11,518 5 comments 1 reaction 1 assignee Claimed by @zinigor View on GitHub
[Feature] Photon [Pri] Low Bug
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

I was testing the new Photon feature: https://github.com/Automattic/jetpack/commit/a8b09618c3e17808b704b4936c9d1dfb6160499d
`add_filter( 'jetpack_photon_noresize_mode', '__return_true' );`

It's a really cool idea, but I did find an issue with how some of the images are being generated with it turned on.

My theme calls for a 218x150 thumbnail, but Photon is using the "w" parameter instead of "resize" for some URLs in the `srcset` markup.

Example:
``

As you can see, most URLs are correctly using "resize". But some use "w", so the wrong image size is being loaded in because it's not accounting for the height. It should be 218x150, but in the example above it's loading in a 218x323 sized image.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.