For this you have to add class using xml file and add background images using css file.
Step 1: app/code/VendorName/ModuleName/view/frontend/layout/default.xml
Step 2: app/code/VendorName/ModuleName/view/frontend/web/css/...
You have to pass an arguments in default.xml for add class in account link:
<block class="Magento\Customer\Block\Account\Link" name="my-account-link">
<argument name="label" xsi:type="string" translate="true">My Account</argument>
<argument name="class" xsi:type="string" translate="true">custom-...
In order to serve your image in WebP in Magento, there are ways to this:
Using Third-Party Services Image CDN like mentioned by @Joseph LoPresti, there are some third party Image CDN like Pico as well. or many other services out there.
Use extension for WebP, but in order to make this extension to work, you might need a minimum VPS hosted Magento. Such as ...
You should run this query:
set disabled = 1 where value_id not in
(select value_id from catalog_product_entity_media_gallery where value in (select value from catalog_product_entity_varchar where attribute_id in (87, 88,89)))
I tried different Magento 2 extensions, including free webp extension by yireo, amasty google optimization, and it didn't work well for me. Every extension has issues with varnish (page cache) and old browsers that do not support webp yet (e.g. Internet Explorer or Safari).
On one client project, I used Cloudflare Polis, it's image optimization service. It ...
I had the same issue, I noticed that some image URIs were still getting wrong addresses.
I already tried clearing the cache, removing the old content manually using:
1) rm -rf var/cache/* pub/static/frontend
2) php bin/magento cache:clean
3) php bin/magento index:reindex
The above didn't resolve the issue, I also tried to re-deploy the static content ...
I was having same issue while trying to duplicate products in 2.3.3 . The image that has issue was in DB (media gallery table) but physical file was not available and copying of images from old product to new product was not working because of this case.
Solution mentioned in this link worked for me:
How can I remove not existing images in magento 2
The Issue may occured due to following 2 reasons.
JS Errors on PDP page
HTML element is duplicated in phtml file
The default magento product details page will show the main image with the option of zoom and zoom container will be hidden by default. Whenever customer mouse over the main image, the zoom image will appear in the mirror glass.