-
Notifications
You must be signed in to change notification settings - Fork 221
Product Image: use WC Core function to render image #9984
Conversation
The release ZIP for this PR is accessible via:
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. |
Size Change: +4 B (0%) Total Size: 1.17 MB
ℹ️ View Unchanged
|
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.
Hey @dinhtungdu,
Thank you for working on this! I was testing and it is working as expected. I just want to confirm with you regarding the step 3 of the testing steps
I can see the alt and src attributes, but size
and loading
is not showing to me. Am I missing something?
![image](https://private-user-images.githubusercontent.com/20469356/248399261-e7a8dada-5d1e-44a3-8011-d316a232533f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2Nzc2ODcsIm5iZiI6MTczOTY3NzM4NywicGF0aCI6Ii8yMDQ2OTM1Ni8yNDgzOTkyNjEtZTdhOGRhZGEtNWQxZS00NGEzLTgwMTEtZDMxNmEyMzI1MzNmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDAzNDMwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQzYTg0ZDI1MTRhM2NjMjliYmZkN2Q4NmJhNTNiNGVhZDkxZjc0NDVmZTIyZDM0ZWM2YTUxZDIzZTY2NmMxYzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.L6CawLTEMIiUGhYjLlfdbLM1YMxP2HKWeYENPgjAAM0)
@thealexandrelara Maybe it's a cache issue. Can you rebuild the branch and test again? Here is what I have on my end: |
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.
I re-run composer install
and now it is working as expected. Great job! LGTM! 🚀
This PR refactors the image render function of the Product Image block to use WC Core functions.
Fixes #9979
Testing
Automated Tests
User Facing Testing
<img>
elements haveloading
,srcset
,size
attributes.WooCommerce Visibility
Performance Impact
N/a
Changelog