F
F
Faber Estello2021-07-26 14:18:23
JavaScript
Faber Estello, 2021-07-26 14:18:23

Responsive images on the site using webpack?

There is a multi-page site and a lot of images.
How can I apply responsiveness to all images ?

<img srcset="elva-fairy-320w.jpg 320w,
             elva-fairy-480w.jpg 480w,
             elva-fairy-800w.jpg 800w"
     sizes="(max-width: 320px) 280px,
            (max-width: 480px) 440px,
            800px"
     src="elva-fairy-800w.jpg" alt="Elva dressed as a fairy">


Is there a webpack plugin that will generate images of different resolutions?
Or some other automated means for this task?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor Danchenko, 2021-07-26
@senselessV7

Use responsive-loader

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question