@anon76427325 if you weren’t around, I don’t know what I would do!
but maybe I didn’t explain well, I have to get the dimensions, because the images are automatically scaled … or, can I put the standard ones of the images I upload?
my goal was to add height and width attributes to images. But I initially thought of getting them from the images themselves, using:
{{ image.width }}
then, I realized that if I add, as you suggested to me:
image.height (). width ()
by entering arbitrary values, I get the same result I was looking for.
after this, I decided not to use derivatives anymore, because the compression of grav is not the most effective, and because I couldn’t configure it well.
Why couldn’t I? Because, as discussed in the other thread, I get a correct result for the images of the same page, however, for the images in the cards, which take images from other pages, connected to the page I am working on, these are not scaled. Therefore, I decided to use a simple resize, and the height and width attributes are consistent at this point.
Now I use this code for images in the cards carousel: