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

First Product Image on Woocommerce Single Product Page Not Converting to Next-Gen with <picture> Tag #889

Open
saranshj4 opened this issue Jun 28, 2024 · 2 comments

Comments

@saranshj4
Copy link

saranshj4 commented Jun 28, 2024

Before submitting an issue please check that you’ve completed the following steps:

  • Made sure you’re on the latest version => 2.2.2
  • Used the search feature to ensure that the bug hasn’t been reported before

Describe the bug
The first product image on the Woocommerce single product page does not convert to next-gen formats (WebP/AVIF) using the <picture> tag method. While other images, including those in the product gallery, are converted successfully, the first product image remains in its original format. The <img> tag is replaced with the <picture> tag, but it does not pull the next-gen version.

To Reproduce
Steps to reproduce the behavior:

  1. Update to the latest versions of Woocommerce and Imagify.
  2. Enable next-gen image display in Imagify settings and select the <picture> tag method.
  3. Ensure next-gen versions are generated for all images.
  4. Navigate to a Woocommerce single product page.
  5. Observe that the first product image is not converted to next-gen format, while other images are.

Expected behavior
The first product image should convert to next-gen formats using the <picture> tag method, similar to the other images on the page.

The workaround is to use the rewrite rules method to display next-gen seamlessly.

Screenshots
image
image

Additional context
In my testing, I noticed that the gallery thumbnails (100x100) were not loading in next-gen formats. However, this was not the case in other user websites.
image

Acceptance Criteria (for WP Media team use only)
Clear instructions for developers, to be added before the grooming

@saranshj4
Copy link
Author

This might be related - #661 (comment)

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

No branches or pull requests

1 participant