Page 1 of 1

Any templates using srcset for images?

Posted: Thu Aug 29, 2024 10:51 am
by Cue4cheap
As in:

Code: Select all

<img
  src="image-300.png" 
  srcset="
    productA-300.png 300w,
    productA-900.png 900w,
    productA-1800.png 1800w"
  alt="productA description"
/>
Or any modification that use this that could be added to 2.3.0.2?
Thanks!
Mike

Re: Any templates using srcset for images?

Posted: Thu Aug 29, 2024 9:12 pm
by JNeuhoff
As far as I know there aren't any OpenCart themes using the srcset attribute.

However, have you considered using svg instead of jpg or png for your images? By its very nature, SVG is fully scalable.

Re: Any templates using srcset for images?

Posted: Fri Aug 30, 2024 6:54 am
by Cue4cheap
JNeuhoff wrote:
Thu Aug 29, 2024 9:12 pm
As far as I know there aren't any OpenCart themes using the srcset attribute.

However, have you considered using svg instead of jpg or png for your images? By its very nature, SVG is fully scalable.
Actually I haven't considered svg. I'll look into it and see how it goes with my theme.
Thank you,
Mike

Re: Any templates using srcset for images?

Posted: Fri Aug 30, 2024 10:53 pm
by Cue4cheap
Cue4cheap wrote:
Fri Aug 30, 2024 6:54 am
JNeuhoff wrote:
Thu Aug 29, 2024 9:12 pm
As far as I know there aren't any OpenCart themes using the srcset attribute.

However, have you considered using svg instead of jpg or png for your images? By its very nature, SVG is fully scalable.
Actually I haven't considered svg. I'll look into it and see how it goes with my theme.
Thank you,
Mike
I used an OCMod to allow svg upload but on the admin side the image doesn't show, just a little block so the image is at least "there" just not showing. I need to figure that out.
On the store front end the image shows ... but boy does that image look like junk. I used an online png to svg converter and it appears I need to find something else to convert it as as the image looks like pure garbage.
Mike