Site logo

Archived topic

Adding <img tag on container's background image

7 replies · Started by Huseyin on June 14, 2020

Viewing posts 1–8 of 8

Hey, guys,

Wondering how could add the <img /> tag for background images for containers (for generateblocks).

So in my homepage, I use the container's background image feature.

https://ibb.co/gWPSWTD
https://ibb.co/swjHjK4

Hi there,

Not sure if I fully understand.

Background images doesn't use <img> tag?

So I had I problem when I enabled the CDN on the website, and posted the problem on FB Group, someone suggested me to " for better performance, use tag instead of background image. That will also fix the issue." '

Check the test, there's two files loading for hero section. (Serve resources from a consistent URL)
https://gtmetrix.com/reports/rydalmerekebabs.com.au/saRNrXTw?

Hi there,

you cannot automatically replace a background image with an <img> tag.
There are ways around it - but they could generate other issues.

I wouldn't be concerned about the those issues GT Metrix is raising. Whats important there is that the site loads quickly. More the question is why would you need a CDN for a site that serves a very specific location ?

ohh I see,

So the website is located in a Singaporean Server, and using CDN to serve the files from a Sydney data center.

Sorry but there isn't much we can do about it at this time.

all good David, anyways thanks for the help

You're welcome

This archived topic is closed to new replies.