Open kanabalt opened 2 months ago
Could you indicate where it occurs (default page, blog page, blog list page, etc)?
Default. But also on blog, item, etc.
Have you got any online Grav site where I can see this issue in action?. The default and others templates use cropZoom
filter, with image width and height values. On demo site, you can see with inspect tools, the code under the images.
Are you using the latest version of theme?
Sure! https://ratrak.si/dsr/novice/scenarnica-plus-nicesar-nas-ne-sme-bit-strah
I'm aware of cropZoom
and I've removed it from blog-list-item.html.twig
because I didn't want blog list to show images, but I don't think that's the problem (I've tried returning it, still not working properly). Everything is up to date. 🤷♂️
Hi. I've made a new blog page in the demo page, similar to your page. I'm not able to reproduce this issue with defaults values. Maybe you will need to clear old cache from Grav and clear your browser cache.
Any advance with this issue?
Clearing cache doesn't work because it doesn't work on any kind of device (tried pc, mac, ios, android). I've tried disabling all the plugins as well but that also doesn't change anything. It's a really weird problem since it's a simple cropZoom function that should be working. I've also tried switching the page template from default to blog, to item, but it's still the same problem everywhere. Not really sure what to try anymore except commenting out the "featured image" feature. I'll play with it some more first, though.
Happens in the gallery as well: https://ratrak.si/dsr/gallery-test
Have you checked the php requirements for Grav in your server? The GD library is used and necessary to manipulate images with php.
In your Gallery test page, the browser inspector explicitly displays the image's width and height attributes:
<img itemprop="http://schema.org/image" alt="" class="gallery_content-image" src="/dsr/images/4/b/c/a/8/4bca84281b4bc9b481cd2b3a0fa66809b5166ee0-girl-6920625960720.jpg" width="600" height="450">
In Editorial demo gallery, this is the code:
<img itemprop="http://schema.org/image" title="Picture one" alt="Picture one" class="gallery_content-image" src="/images/e/b/c/5/f/ebc5f627a7bbfb7d8469d06ddab2455a1def5291-q75pic03.jpg">
Thumb width and height attributes are declared in the gallery.html.twig:
{% set thumb_w = page.header.thumb_width|default(600) %}
{% set thumb_h = page.header.thumb_height|default(450) %}
.
.
{% set thumbnail = item_image.cropZoom(thumb_w, thumb_h).attribute('itemprop','http://schema.org/image').html(item_title,item_title,'gallery_content-image') %}
but they are used with the cropZoom filter, not explicitly as thumbnail width and height attributes.
Are you using the latests version of theme?
Everything is up to date. I installed a new instance of Grav on my server with your theme and everything works properly. Something is obviously breaking this, either some plugin or I might've busted it somehow in yaml files. Will look into it some more.
When I add a featured image with default settings, the image doesn't resize properly. It squishes instead.