Need help getting srcset to work with Owl Carousel

I’m trying to get srcset to work with my carousel. It works perfect when the links are going to When I change the links to my images, the image does not load. Any ideas?
This works:

<img src=""
               srcset=" 768w,
               alt="image" />

This doesn’t work:

<img src="images/razors-edge-pit-banner1920.jpg"
               srcset="images/razors-edge-pit-banner480 480w,
                       images/razors-edge-pit-banner640 640w,
                       images/razors-edge-pit-banner940 940w,
                       images/razors-edge-pit-banner1366 1366w,
                       images/razors-edge-pit-banner1920 1920w"
               alt="razor's edge pitbull" />

Shouldn’t your srcset images have a .jpg extension?

images/razors-edge-pit-banner480.jpg 480w



Don’t I feel dumb! I was baffled. Funny, how many times I looked at that and missed it. Works like a champ now. Thanks again.

1 Like

Glad I could help. smile

No need to feel bad. I’m sure we’ve all made the same kind of mistake at one time or another (I know I have), where all it takes is another pair of eyes. privateeyes

1 Like

Any idea how I can get lazyload to work?

<off topic>

The three back-tics in several places in the code in your first post should be on a line by themselves to preserve the formatting of the code. :slight_smile:

Sounds like a new topic. :slight_smile:


Thanks for the help.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.