Archived topic
Same image from the same post coming in different sizes in 3 query loops
17 replies · Started by Minhaz on December 22, 2022
I queried the same post in three side-by-side containers with same dimensions. But the same featured image is appearing in 3 different sizes in 3 query loops! Difference in image size is also resulting in misaligned post titles.
Hi Minhaz,
To clarify, did you set the Dynamic Options of the Image Block? Reference: https://docs.generateblocks.com/article/image-overview/#dynamic-data
Make sure the data type is set to Featured Image and Data Source to Current Post.
No, I didn't do that.
I see. Can you set that first? Let us know how it goes.
I just found out that the featured image was set to Dynamic by default. If I turn it off, then I am prompted to manually upload the image, which I don't find convenient.
On Query Loop Blocks, you have to set it to Dynamic if you're looking to retrieve the Featured image of each post.
You shouldn't need to manually do it.
Is the Dynamic option of the Image Block not working?
The featured image is being dynamically retrieved in my case. I didn't pull them manually. But once the images are dynamically retrieved, they are not the same size.
I see. Can you try setting the object-fit of the Image Block to cover? Reference: https://docs.generateblocks.com/article/image-overview/#settings
I just set the object-fit to 'cover'. But unfortunately, the issue remains unresolved.
I see. Can you provide admin login credentials? We'll take a closer look at the issue.
Please use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Sent. Plz check.
I'm not seeing it. Can you send it here again through the Private Information field?
Sent
Plz let me know if you've received it or not.
Yes, it's added.
I see. Your setup is incorrect. You should only need one Query Loop Block as opposed to 3.
Basically, instead of placing a Grid Block with three different Query Loops, just place one Query Loop Block inside your Container. Then, Set the POSTS PER PAGE to 3.
Let us know how it goes.
