-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Using ![]() image Markdown results in incorrect image dimensions #777
Labels
bug
Something isn't working
Comments
It appears setting |
DanielBaulig
added a commit
to DanielBaulig/LoveIt
that referenced
this issue
Dec 19, 2022
DanielBaulig
added a commit
to DanielBaulig/LoveIt
that referenced
this issue
Dec 19, 2022
DanielBaulig
added a commit
to DanielBaulig/LoveIt
that referenced
this issue
Dec 19, 2022
I'd been resizing all my images manually - only today I noticed that |
.single .content img{
height: auto
} Works perfectly, thanks! |
flydo
pushed a commit
to forkdo/LoveIt
that referenced
this issue
Jan 15, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug 描述你遇到的错误
When using the
![Alt text](image_url.png)
Markdown in content in front matter leads to an incorrectly sized image for very large images. The generated CSS results in a scaled down image to be displayed, but the height of the image element itself remains the original height of the image. This appears to be because the layouts/partials/plugin/img.html plugin explicitly renders width and height attributes on the img element. If those are removed, the image scales correctly not blocking out unused whitespace along it's vertical axis.Expected behavior 期待的行为
Instead, no explicit width and height should be set on the img element, such that the CSS applied resizing (
object-fit: contain
andmax-width:100%
) can free up the vertical space.Environment 构建环境
The text was updated successfully, but these errors were encountered: