• Resolved Anonymous User 20238576

    (@anonymized-20238576)


    Hello Gijo,

    I may be overthinking this, but this is something that interests me and I can’t seem to find a a right information on this.

    When uploading an image in Oxygen builder, I have a habit of setting the width and height attributes to prevent CLS.

    My question:
    Should image width and height attributes be changing based on the device?

    For example:
    Desktop -> Image Attributes= Width:”540″ & Height: “640”
    Mobile -> Image Attributes= Width:”270″ & Height: “320”

    Or are the image attributes only to calculate the aspect ratio and then the CSS (namely max-width: 100% and height: auto) is used to make it responsive?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Gijo Varghese

    (@gijo)

    @tomanuel use width/height only the tell the browsers the aspect ratio of the image. So it will be constant on every device.

    Use CSS to conditionally resize the image depending on the device.

    Thread Starter Anonymous User 20238576

    (@anonymized-20238576)

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Responsinve image width/height attributes’ is closed to new replies.