TryGhost / eleventy-starter-ghost

A starter template to build websites with Ghost & Eleventy
https://eleventy.ghost.org
MIT License
351 stars 165 forks source link

Images sourced from external sites i.e Unsplash stop build #18

Closed tomwerneruk closed 4 years ago

tomwerneruk commented 4 years ago

Issue Summary

All builds fail when processing remote images, as they contain ? or #.

To Reproduce

  1. Migrate a Ghost blog that uses Unsplash stock photos as part of content.
  2. Setup integration with Netlify and eleventy-starter-ghost.
  3. Attempt deploy using out of the box toml.

9:31:08 PM: Failed during stage 'deploying site': Invalid filename 'assets/images/Z1CXdU8-photo-1485617359743-4dc5d2e53c89?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjExNzczfQ'. Deployed filenames cannot contain # or ? characters

Technical details:

tomwerneruk commented 4 years ago

Appears to be an issue with the cache bust functionality (stripping beyond ?) isn't incorporated into the package deps for this. Locally, changing from ^0.0.3 to git://github.com/robb0wen/eleventy-plugin-local-images.git worked, although not an ideal long term solution.

daviddarnes commented 4 years ago

This was fixed in https://github.com/robb0wen/eleventy-plugin-local-images/pull/6, I'm just waiting for the dependency to get pushed to npm 😊

daviddarnes commented 4 years ago

This has been fixed with #23