Answer the question
In order to leave comments, you need to log in
Recommend an image resizer and HTML markup generator?
There is a picture image.jpg large enough in size 4000*5000 px, a config of the necessary sizes for breakpoints {1200: 900px, 768: 700px, 1: 500px}
and a dpr config {1, 2, 3}
.
You need to get a pack of pictures according to the specified sizes:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
and HTML markup (just output to the console)<picture>
<source media="(min-width: 1200px)" srcset="[email protected] 1x, [email protected] 2x, [email protected] 3x">
<source media="(min-width: 768px)" srcset="[email protected] 1x, [email protected] 2x, [email protected] 3x">
<img srcset="[email protected] 1x, [email protected] 2x, [email protected] 3x">
</picture>
A similar task is easily solved in a CMS, but sometimes you need a "manual", console solution, preferably on node.js. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question