nhoizey/jekyll-cloudinary

Plugin wrongly assumes that images are stored in collection directory

kslstn opened this issue · 1 comments

I'm using the include like this:

{% assign path = file_name | prepend: "assets/cms" %}
{% cloudinary {{ path }} alt={{ alt_text }}" %}

For a file_name example.jpg in a post of the collection _my_collection I get the error:

[Cloudinary] Couldn't find this image to check its width: [ directory with my project]/_my_collection/posts/assets/cms/example.jpg.

Apparently it's assumed that the images are stored in collection's directory. I'm using Forestry, so all images for all collections are stored in assets/cms. The prepend: "assets/cms" part isn't causing this by the way.

Is there a way to include paths relative to the root of the project?

It looks like one can circumvent this issue by using absolute URLs for the source.