-
Notifications
You must be signed in to change notification settings - Fork 62
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
Fix (Dynamic Content): prevent blurry images when using image optimizer #3369
base: develop
Are you sure you want to change the base?
Conversation
🤖 Pull request artifacts
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add some documentation to help us in the future.
Also, let's only load the file only when the EWWWW plugin is activated
|
||
if ( ! function_exists( 'stackable_load_image_optimizer_polyfill_frontend_script' ) ) { | ||
function stackable_load_image_optimizer_polyfill_frontend_script( $block_content, $block ) { | ||
if ( ! is_admin() ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's only do this only when the EWWWW plugin is present
} | ||
|
||
if ( ! function_exists( 'stackable_load_image_optimizer_polyfill_frontend_script' ) ) { | ||
function stackable_load_image_optimizer_polyfill_frontend_script( $block_content, $block ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some comments here to explain why we need to load this file when EWWWW is present
*/ | ||
import domReady from '@wordpress/dom-ready' | ||
|
||
class ImageOptimizerPolyfill { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a description of what this file is for, what it does, why we need it, and when it is loaded
fixes #3296