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

Fix (Dynamic Content): prevent blurry images when using image optimizer #3369

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

mxkae
Copy link
Contributor

@mxkae mxkae commented Nov 19, 2024

fixes #3296

github-actions bot added a commit that referenced this pull request Nov 19, 2024
Copy link

🤖 Pull request artifacts

file commit
pr3369-stackable-3369-merge.zip 9af5554

Copy link
Contributor

@bfintal bfintal left a 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() ) {
Copy link
Contributor

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 ) {
Copy link
Contributor

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 {
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image block issue with Dynamic Content and EWWW Image Optimizer
2 participants