I'm not sure why the aspect ratio rules trigger on scr too, and not just alt, but this causes it to trigger from dates in the file name, such as "2025-11-10".
The following snippet can be used to override this while retaining the ability to set the ratio with the alt tag (repeated the alt rules in case both scr and alt would apply to a file):
.internal-embed.image-embed[src*="1-1"] > img,
img[src*="1-1"],
.internal-embed.image-embed[src*="4-3"] > img,
img[src*="4-3"],
.internal-embed.image-embed[src*="16-9"] > img,
img[src*="16-9"]
{
aspect-ratio: unset;
object-fit: unset;
}
img[alt*="1-1"]
{
aspect-ratio: 1/1;
object-fit: cover;
}
img[alt*="4-3"]
{
aspect-ratio: 4/3;
object-fit: cover;
}
img[alt*="16-9"]
{
aspect-ratio: 16/9;
object-fit: cover;
}
I'm not sure why the aspect ratio rules trigger on
scrtoo, and not justalt, but this causes it to trigger from dates in the file name, such as "2025-11-10".The following snippet can be used to override this while retaining the ability to set the ratio with the alt tag (repeated the
altrules in case bothscrandaltwould apply to a file):