V
V
Vladimir2017-10-04 12:26:37
HTML
Vladimir, 2017-10-04 12:26:37

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.
There are interesting options on the Internet https://github.com/felixrieseberg/responsive-image... https://github.com/TrigenSoftware/gulp-srcset, https://github.com/mahnunchik/gulp-responsive only for resize, but I want a comprehensive solution for maximum automation and without bicycle building.
Recommend if you have seen something similar?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question