Closed dandaka closed 8 years ago
Hi @dandaka
Yep, it is good question :smile:
I think it is task
for some kind of config
-generators.
For example I use this one gulp-responsive-config. It parses image filename (by this module parse-image-dimensions) and produces per-image configuration.
Image image-100x200@2x.png
became:
{
name: 'image.png',
width: 200,
height: 400,
rename: 'image-100x200@2x.png'
}
I really use them in production but I haven't enough time to prepare them to release and document usage. Sorry :cry:
Any plans to do it some time? Any help needed?
Maybe you can throw few example of production code, so I can guess from that.
It is one of planed tasks https://github.com/mahnunchik/gulp-responsive/issues/23 :smile:
I will try to do it today.
Hi @dandaka
Usage examples: https://github.com/mahnunchik/gulp-responsive/tree/master/examples
That's cool, thank you!
This is not a task, but rather a question.
Use case. Some images are better (smaller size and less compression artifacts) to be converted to PNG (graphics), some to JPG (photos). Usual scenario is like this:
gulp-responsive
in file extensions. So .PNG → .PNG, .JPG → .JPG. Alternative is configuration in JSON (either gulpfile.js or each folder), which is more complicated to setup.How do you config such cases? Maybe there is another hidden option inside next branch, that should be documented :)
To make it more automatic, we could use https://github.com/Huddle/Resemble.js to analyse artefacts (difference) from different output. And select optimal. But this sounds like a huge task with big risks.