Issue #2702✓ SolvedOpened April 5, 2020by lewishealey4 reactions

Are you able to define srcSet or picture via asset manager

快速解答by abozhinov3

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.

Read full answer below ↓

Question

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?

Answers (2)

👍 Most helpfulabozhinovApril 7, 2020

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.

pouyamiralayiApril 7, 2020

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

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...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.