Archived topic
Image has not explicit width and height (width=”” height=“”).
5 replies · Started by purnima banik on May 30, 2021
Hi GP Team,
Although I went through a lot of pre-topic check on the same issue but could not find my answer. Well the issue is with the image that I embed through image block in the contents. Actually the images are hosted on my subdomain even then I am getting this issue. To resolve the issue, although I can set every image with the same attributes manually. But that would be very cumbersome. Hence, looking for some suggestions like CSS codes or some tricks to implement the same throughout the site at dajobb.com.
Thanks
Hi there,
Are you trying to change the display size on browser of the image blocks? If yes, then we can certainly do this with just CSS.
But if you're trying to actually change the image height and width attribute, then you really must change the image block's image dimensions one by one manually. (or use an image optimization plugin like ShortPixel).
Reminder: Since you're using image block, how it renders isn't something the theme controls as Image block is a WordPress core block.
Its attribute relies on whatever you've put here - https://share.getcloudapp.com/L1uBxW1z
Let us know what exactly are you trying to do. :)
The problem is that I even after defining the Width and Height of the image in the image block get this error in Page speed insights. Hence, I actually want to change the display size on browser of the image blocks, such that I do not get this error. Any suggestion would be most welcome.
Hi there,
did you resolve this as i cannot see the error on the url you provided?
Yes, I resolved this. Thank You.
Glad to hear that