1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

Preventing image reflow (fix #351)

This commit is contained in:
Cotes Chung
2021-06-30 19:08:42 +08:00
parent 08ec6cd3b5
commit 6d1d440c00
4 changed files with 55 additions and 12 deletions

View File

@@ -44,7 +44,11 @@ layout: default
<div class="post-content">
{% if page.image.src %}
<img src="{{ page.image.src }}" class="preview-img" alt="{{ page.image.alt | default: "Preview Image" }}">
<img src="{{ page.image.src }}"
class="preview-img"
alt="{{ page.image.alt | default: "Preview Image" }}"
{% if page.image.width %}width="{{ page.image.width }}"{% endif %}
{% if page.image.height %}height="{{ page.image.height }}"{% endif %}>
{% endif %}
{{ content }}