Grapesjs: Are you able to define srcSet or picture via asset manager

Created on 5 Apr 2020  路  2Comments  路  Source: artf/grapesjs

When replacing an image via the asset manager, I have a requirement where I need to input multiple sizes of images for responsive optimisation. Any guidance on defining srcSet attributes or picture?

Most helpful comment

Hi,
overwrite IMAGE component. Add listen on SRC and when changed it generate srcset attribute.
Before that when you upload image should generate 1x and 2x version.

All 2 comments

Hi,
overwrite IMAGE component. Add listen on SRC and when changed it generate srcset attribute.
Before that when you upload image should generate 1x and 2x version.

@lewishealey you have also the option to change the assets manager behavior; checkout #2516 comment
Cheers!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Geczy picture Geczy  路  3Comments

krunal039 picture krunal039  路  3Comments

desilvaNSP picture desilvaNSP  路  3Comments

mathiasbc picture mathiasbc  路  3Comments

adam-gpc picture adam-gpc  路  3Comments