gulp-picture-to-source-html
Parses HTML files to find img tags and replaces them with picture/source/img tags.
If you want to use LQIP, then execute it after using this plugin. See Example.
Attention, date-src has priority when choosing the location of the file.
Usage
Example
Without LQIP
With LQIP
Options
extensions
Type:
String
Default:
[".jpg", ".png", ".jpeg", ".JPG", ".PNG", ".JPEG"]
Extensions of processed files.
newExtensions
Type:
String
Default:
[".webp"]
Output file extensions.
Acknowledgement
Thanks gulp-webp-in-html for the inspiration.
If you need to write the result in a different format, then use this plugin
Last updated
Was this helpful?