Issue #2684Opened March 25, 2020by imso0770 reactions

Picture element

Question

Hi, I would like to add a "picture" block to the editor, where we could define differnt image for different device, the base html for that would look like so:

<picture>
        <source data-gjs-type="source" media="(min-width: 650px)" srcset="">
        <source data-gjs-type="source" media="(min-width: 465px)" srcset="">
        <img src="">
      </picture>

My problem is, wen it is inserted to the editor, the img component, is viisble, and moveable, even from the picture element. With that it could be cause unintended layout problems, and the images could end up in different place. Another issue with this, that the amount of sources could be changing by usage, sometimes, it is only 1 source (device support) reuired sometimes, 3...

What would be the best way to overcome these problem?

Answers (2)

imso077March 30, 20200 reactions

Hi, hi you all solve the problem of responsive images ? (We have to change images, because of the content of the image should change on smaller devices, so the focus is smaller)

artfApril 2, 20200 reactions

Learn how to create custom Components and then take a look at all the available properties on the Component (so you can tell, for example, the image not being draggable)

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.