nhoizey/jekyll-cloudinary

Support responsive images in pages (additionnaly to posts)

k16e-me opened this issue · 5 comments

Hi, I have set verbose: false even explicitly. And I imagine that the call for the image happens to Cloudinary, not from my project folder, but still for every image I call, I get this error:

[Cloudinary] Couldn't find this image to check its width: /Users/kbmac/Documents/Sites/kom_v1/_pages/home_hero_i4mius.jpg.
       [Cloudinary] Couldn't find this image to check its width: /Users/kbmac/Documents/Sites/kom_v1/./home_hero_i4mius.jpg.
cloudinary:
  cloud_name: cholita
  verbose: false
  origin_url: 'https://res.cloudinary.com/cholita/image/upload/'
  presets:
    default:
      min_width: 576
      max_width: 1920
      fallback_max_width: 1024
      steps: 4

image

Hi @k16e-me, were you trying to use this plugin in a page?

It looks like it works well in posts, but not yet in pages.

I think I have a similar issue as what is described here, so will add a comment instead of starting a new topic.

I've been trying to use this (awesome!) plugin to transform images in the page templates with Cloudinary. I've tried a wide array of implementation options including the below:

{% cloudinary page.image alt="{{ page.title }}" %}
{% cloudinary { page.image } alt="{{ page.title }}" %}
{% cloudinary {{ page.image }} alt="{{ page.title }}" %}

Interestingly, the page.title attribute is supported and does properly print the page title into the alt tag. However, the tag for the page.image without brackets simply inserts that text at the end of the cloudinary url with this error:

[Cloudinary] Couldn't find this image to check its width: /Users/judmoore/github/judsonlmoore.com/_posts/travel/destinations/ireland/page.imag.

Note that the "e" is missing at the end of page.image. Not sure why.

When I write some variation of { page.image } then I get this error:

[Cloudinary] Can't read this tag: post-hero {{page.image}} alt="{{ page.title }}" Liquid Exception: exit in /_layouts/post.html

Questions

  1. Is there a currently-supported proper way to do what I am aiming to accomplish?
  2. Might this be supported soon?
  3. Any other recommendations for handling non-post-content images with cloudinary?

Hey @judsonlmoore were you able to figure out what was causing the error?

For some reason I have two exact templates (different layouts), one of them works while the other one throws:
[Cloudinary] Can't read this tag: tiny {{ faculty.image }} alt="{{ faculty.title }}" Liquid Exception: exit in /_layouts/program.html

@judsonlmoore I opened a different issue for your topic: #88

@nhoizey no sir, I never figured it out, I think I just lived without. Will check topic #88. Thanks!