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

Tiled Gallery: Ensure Photon strips only 'info', not 'all' when inserting SrcSet #13735

Merged
merged 1 commit into from
Oct 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions extensions/blocks/tiled-gallery/tiled-gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public static function render( $attr, $content ) {
$srcset_src = add_query_arg(
array(
'resize' => $w . ',' . $w,
'strip' => 'all',
'strip' => 'info',
),
$orig_src
);
Expand All @@ -108,7 +108,7 @@ public static function render( $attr, $content ) {
for ( $w = $min_width; $w <= $max_width; $w = min( $max_width, $w + self::IMG_SRCSET_WIDTH_STEP ) ) {
$srcset_src = add_query_arg(
array(
'strip' => 'all',
'strip' => 'info',
'w' => $w,
),
$orig_src
Expand Down
4 changes: 2 additions & 2 deletions extensions/blocks/tiled-gallery/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function photonizedImgProps( img, galleryAtts = {} ) {
.map( srcsetWidth => {
const srcsetSrc = photonImplementation( url, {
resize: `${ srcsetWidth },${ srcsetWidth }`,
strip: 'all',
strip: 'info',
} );
return srcsetSrc ? `${ srcsetSrc } ${ srcsetWidth }w` : null;
} )
Expand All @@ -99,7 +99,7 @@ export function photonizedImgProps( img, galleryAtts = {} ) {
srcSet = range( minWidth, maxWidth, step )
.map( srcsetWidth => {
const srcsetSrc = photonImplementation( url, {
strip: 'all',
strip: 'info',
width: srcsetWidth,
} );
return srcsetSrc ? `${ srcsetSrc } ${ srcsetWidth }w` : null;
Expand Down