PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

How to Set Flag Image Width and Height Attributes

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

I am using this WOOCS shortcode to insert the currency switcher. [woocs show_flags=1  txt_type="desc"]

How do I include width and height attributes for the flag image so that explicit size values are included in the <img> tag?

Hello

Please  use  custom  CSS

You can find all the parameters of the shortcode here - https://currency-switcher.com/shortcode/woocs

I have the width and height set in CSS; however, Lighthouse still flags this as a problem as no explicit width and height values are set in the <img> tag.

https://quadica.com/documents/lighthouse.png

This can significantly affect the Cumulative Layout Shift score, which Google and other search engines are now putting much greater emphasis on. So I am looking for a way to add explicit size values to the <img> tag.

Hello

Please  drop me  exact  link to the  issue

You can see an example page here:

https://staging-luxeonstarleds.kinsta.cloud/product/ansi-white-2700k-rebel-led-on-a-sinkpad-ii-20mm-star-base-156-lm-700ma/

Here is a marked-up screenshot showing the issue and what I am trying to achieve.

https://quadica.com/documents/image-attributes.png

 

hello

Unfortunately for this type of switcher there is no way to change the HTML. Because it is generated with a third party JQ library

Thank you for looking into this.

Considering that these settings are important in minimizing Cumulative Layout Shift, which is part of Core Web Vitals, I hope this problem is fixed soon.

 

Hello

I will write to the author of this JQ library/ Welcome;)