0
Welcome Guest! Login
0 items Join Now

srcset

    • boyer's Avatar
    • boyer
    • Newbie
    • Posts: 1
    • Thanks: 0

    srcset

    Posted 6 years 7 months ago
    • RT_Galatea 1.2.1
      Gantry 5.4.16
      Joomla 3.7.5

      Hello, I would like to know if it is possible to add the "srcset" attribute in an owlcarousel particle to avoid image resizing.

      The current code is:

      <div class="g-owlcarousel-item-img">
      <img src="{{ url(item.image)|e }}" alt="{{ item.linktext|e }}">
      </div>

      And I would like to add a code like this:

      <img src="small.jpg" alt="{{ item.linktext|e }}"
      srcset="large.jpg 1920w,
      medium.jpg 1080w,
      small.jpg 750w"
      sizes="(min-width: 36em) 33.3vw,
      100vw">

      While knowing that there are three different items in the particle so three different images.
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22450
    • Thanks: 2679
    • Web Developer

Time to create page: 0.051 seconds