Iām using thumbs to create a layout with Isotope and LazyLoad plugin. Itās nessesary to put the image width and height to work, so I would like to make a thumb with āheight=autoāā¦
With this inside the img tag, width="<?php echo thumb($image, array('width' => 300))->width() ?>"
I can resize my width image but I want to get the image height after the resize, proportionally, and automatically, something like height="<?php echo thumb($image, array(...if image thumb is 300, proportionnaly based on the original file, the height is (..?..))->width() ?>"
Itās quite difficult for me to explain, but for example in Photoshop, if you resize the image, by just putting the width size, you can get the height size of the image, proportionnaly. Itās like Kirby CMS donāt allow to make this, am I right ? In my thumbs case, how can I fix it ?
Maybe something this ->ratio() and calculating it ?
But in my CSS file, I had to do img{width:100%;height:auto} to have fluid images. So if i remove height:auto, the image will be outside the item container with an absolute height, and if I remove the width: 100%; and height:auto, the images will be undersized.
So I donāt know what to do, this is my actual image :
It looks like my problem comes from the ādata:imageā value inside āsrcā. The $image->resize(200) take his source from the āsrcā instead of the data-original (from Lazylaod). My question now is how to make it.
Is it possible to change this $image->resize(200)
to this $image->from-data-original()->resize(200)
I donāt really understand what you are trying to say here. What do you mean by ādata-originalā? $image->resize() takes the original image on the server as a basis to calculate the thumbnail and saves it in the thumbs folder.
Yes you right, Iām really confusedā¦Forget my previous comment that is not exactly where my problem comes from. I think this comes from the jquery. Iām starting from this code bellow:
And I just want to make it fluid with image width:100%, but on windows load, images are over each one, and when you resize, the layout become nice. Very strange.