externalImages.destination doesn't work when externalImages.sources are absolute paths
See original GitHub issueIf you pass absolute paths to externalImages.sources
, the destination
seems to be completely ignored and the files are overwritten in place.
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (16 by maintainers)
Top Results From Across the Web
Getting Absolute Path of External Web Page Images
But I am having problem with the relative path of photos. for example the photo source on external page say http://www.example.com/dir/index.php.
Read more >Linked images are not displayed when a PowerPoint ...
Cause. The folder containing the pictures has been moved. Microsoft Office PowerPoint 2007, PowerPoint 2003, and PowerPoint 2002 use an absolute path to...
Read more >How to use Relative and Absolute Paths in HTML - YouTube
Very basic walkthrough on how to use relative and absolute paths in HTML.Keep in mind I am a student in this course so...
Read more >Dockerfile reference - Docker Documentation
Docker can build images automatically by reading the instructions from a ... is an absolute path, or a path relative to WORKDIR ,...
Read more >Dealing with files - Learn web development | MDN
File paths · Copy the image you chose earlier into your images folder. · Open up your index. · The line <img src=""...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Good catch! It seems in my refactoring I managed to double-read the file!
I can fix that one along with this.
Another thing I noticed (and I don’t know if has anything to do with this plugin or not), but if I run webpack directly it takes about 4s to optimize a folder of images, BUT if it run the same exact webpack command through npm it takes over 40s for the same set of images. I’ve added some logging and it looks like the optimize itself is taking longer for some reason.
Also from looking at the code, I think you are reading the file contents twice if it isn’t in the cache – once on 151 and again on 159 https://github.com/Klathmon/imagemin-webpack-plugin/blob/683fbe4f5f23ece85127f73bbb98c2a6dbb36672/src/index.js#L151-L164