Skip to content

Commit 58447e0

Browse files
Merge pull request #1378 from dhananjaykuber/fix/1375-prevent-jpeg-output-when-disabled
WebP Uploads: Prevent picture element when JPEG output is disabled
2 parents f70b0a2 + cd8c7d1 commit 58447e0

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)