aryehraber / statamic-responsive-img

Statamic v2 Addon that automatically handles responsive images using srcset.
MIT License
12 stars 1 forks source link

Images dont load, dont even creates the HTML code #14

Closed tiagofcp closed 5 years ago

tiagofcp commented 5 years ago

Hi. Im trying to use ResponsiveIMG but im having a issue, i cant get to load the assets that are choose when we edit the page on the backoffice. This is my responsive code {{ responsive_img:image_bundleitem }}

I can load the image normally with the img tag and if i place for example this on top of the template file

---
banner: /assets/services/destaquefatkiller.jpg
---

{{ responsive_img:banner }}

and if i use then this on the code it works

Can someone help me please

tiagofcp commented 5 years ago

If i do {{ image_bundleitem | dump }} it shows the right url to the img

simonhamp commented 5 years ago

I've had similar issues since upgrading our site to Statamic 2.11.9.

A php please clear:cache usually sorts it out.

But it's weird that it happens somewhat sporadically.

aryehraber commented 5 years ago

Latest release should fix the above issue!

Turns out at some point the Tag __call() method started receiving the camelcase version of method names, which didn't match up with the context's variable names (image variables). Eg: my_hero_banner would become myHeroBanner, however banner remained banner because it was a singular word.