Skip to content

Commit cd8c7d1

Browse files
fix(webp-uploads): prevent picture element when JPEG output disabled
1 parent f70b0a2 commit cd8c7d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/webp-uploads/helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ function webp_uploads_sanitize_image_format( string $image_format ): string {
393393
* @return bool True if the option is enabled, false otherwise.
394394
*/
395395
function webp_uploads_is_picture_element_enabled(): bool {
396-
return (bool) get_option( 'webp_uploads_use_picture_element', false );
396+
return webp_uploads_is_jpeg_fallback_enabled() && (bool) get_option( 'webp_uploads_use_picture_element', false );
397397
}
398398

399399
/**

0 commit comments

Comments
 (0)