For speed optimalisation I want to give the image elements a width and height.
I do it like attached but I still got the message: Image elements do not have explicit width and height
Could you please let me know if the notice still displays if you choose this option : hidden link
I assume Setting explicit width and heights can help the browser to reserve the appropriate space, so that your page does not experience bad layout shifts or appear broken to users. Additionally, this helps reduce the main thread work the browser must process and helps with a smoother overall experience. In that case, the second option should work.
If not, could you please tell me where you are seeing this notice? What plugin/interface shows it?
I could not find any past forums talking about this issue and I can't seem to replicate it on a clean version,
I have created the sandbox below where you could access and try replicating the issue there, could you please create a block with an image there and upload the images there. Try applying the explicit image there and see if the issue replicates :
I would like to ask for temporary access to your test site’s wp-admin and FTP to investigate the issue further.
Kindly provide me with the steps on how to replicate the problem.
It is important to note that you should back up your site and database before proceeding, and you can use a plugin like Duplicator for this purpose. Here’s a link to the plugin: http://wordpress.org/plugins/duplicator/
For your privacy and security, please ensure that you make your access is shared through the form below.
If we take this picture as an example: hidden link
The image paths on the page (cdn-cgi) suggest a third-party CDN service is in use for image delivery. I suggest to test with that service disabled to see if that makes a difference.
If that did not help, overall, there are two common ways to solve this, though one of them isn’t an actual solution:
1. Leave it as is since it doesn’t affect the scores too much and isn’t a major issue.
2. Redo the CSS/HTML to provide static image sizes, for example, you could do something like: