question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

externalImages.destination doesn't work when externalImages.sources are absolute paths

See original GitHub issue

If you pass absolute paths to externalImages.sources, the destination seems to be completely ignored and the files are overwritten in place.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
Klathmoncommented, Jan 29, 2018

Good catch! It seems in my refactoring I managed to double-read the file!

I can fix that one along with this.

1reaction
eamodiocommented, Jan 29, 2018

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found