Open
Description
When using Content Type Image and using a mobile and desktop image both images are loaded by the browser. It should only load the image you see. The template is now using two img-tags. But it would be better to use the picture-tag.
Current situation
vendor/magento/module-page-builder/view/adminhtml/web/template/content-type/image/full-width/master.html
<figure>
<a>
<img src="…" class="pagebuilder-mobile-hidden" />
<img src="…" class="pagebuilder-mobile-only" />
</a>
<figcaption>…</figcaption>
</figure>
Preferred situation
<figure>
<a>
<picture>
<source media="(min-width: 678px)" srcset="…">
<source media="(max-width: 677px)" srcset="…">
<img src="…" />
</picture>
</a>
<figcaption>…</figcaption>
</figure>
I haven't figured out how page builder works exactly so haven't got a PR ready for this. But does everybody agree that this is a better implementation? Otherwise you're loading desktop images on a mobile device. That's taking up to much resources.