When we set a link on an image element, element dimensions (width/height) are set on the a tag and img is 100% width/height, which can lead to undesired aspect ratio (for instance with auto width).
Dimensions should be set on img tag and a tag should be left untouched.
I think it should be the same for all CSS properties.
Quick fix: Wrap image with a div and make the div a link to keep image element healthy.
I think this is still an issue.
Do a query loop for post with featured image, use featured image use thumbnail which is 150px x 150px. BUT when linking image to the post (using bricks ālink toā ), which creates the a tagā¦
In the builder this linked thumbnail image is still 150 x 150px⦠but on front end is now 300 x 300px, distorted.
When link is removed, everything is fine.
So somewhere between bricks adding this to the css, is the problem.
Hi guys,
Sorry, I overlooked the answer at the time.
We will check if we can change something about the behavior in Safari. The problem is that it works in all other browsers without any problems, meaning: the risk is high that changes could lead to significantly more problems than before. Especially with an element like the image element, a quick fix is certainly not a good choice.
@BGdev Can you provide me with a live link showing the issue in its simplest form?
This issue is easily replicated and also being experienced from numerous people, so itās not an isolated issue. Also, I copy / pasted the CSS that bricks is generating for the element. You can see where bricks is overwriting the thumbnail size of 150px x 150px (in my case).
Replicate by:
Add image element. Choose thumbnail for size, 150px x 150px (in my case).
Make the image a ālink toā any url.
It remains correct size in builder⦠Frontend the image is forced to be larger (when it should still be thumbnail size).
Iām having the same problem that doesnāt happen with Chrome but with Firefox.
The image looks good until I set the link to the dynamic data post. I also tried putting full size but nothing changes.
In practice, the proportions of the images do not remain fixed, if I zoom the page, the images are squashed vertically.
If instead I click and drag the bottom corner of the browser to resize the window, the images also resize but always with distorted proportions.
Some idea?
Can you please provide me with a live link where I can see the problem since I canāt replicate it? If you donāt have a live installation you can use try.bricksbuilder.io.