rbuchberger / jekyll_picture_tag

Easy responsive images for Jekyll.
https://rbuchberger.github.io/jekyll_picture_tag/
BSD 3-Clause "New" or "Revised" License
619 stars 103 forks source link

Warning: source image /img/blog/example.png is missing. #85

Closed cpury closed 6 years ago

cpury commented 6 years ago

I'm running jekyll version: 3.7.0 with jekyll-picture-tag version 0.3.0. I just installed the gem according to the readme and configured it like this:

picture:
  markup: "picture"
  presets:
    default:
      ppi: [1, 1.5, 2.0]
      source_medium:
        media: "(min-width: 40em)"
        width: "600"
      source_default:
        width: "600"

Then I try to include an image:

{% picture "img/blog/example.png" %}

When building the site, I get this warning six times:

Warning: source image "img/blog/example.png is missing.

But the image is there. Even copy+pasting that URL and opening http://localhost:4000/img/blog/example.png in my browser opens it successfully. I don't know why Picture Tag can't find it, and I have no further information. Googling did not turn up any results.

Help would be greatly appreciated.

cpury commented 6 years ago

Debugged it in the gem code. The problem was with the " in my tag. The correct usage is {% picture img/blog/example.png %} without quotes.