tomjoht / documentation-theme-jekyll

A Jekyll-based theme designed for documentation and help systems. See the link for detailed instructions on setting up and configuring everything.
http://idratherbewriting.com/documentation-theme-jekyll/
Other
1.18k stars 1.19k forks source link

Image size not being considered when rendering HTML pages #238

Open rogeriod opened 2 years ago

rogeriod commented 2 years ago

Whether an image is specified with the inline_image.html or in html, with specific dimensions, or in markdown with no image size, HTML pages always render the image identical (example 1)

{% include inline_image.html file="faro.png" max-width="300" alt="Faro, Portugal" %}

<img src="/images/faro.png" width="200" alt="Faro, Portugal">

![Faro, Portugal](/images/faro.png)

screencapture-127-0-0-1-4000-mydoc-c18-10-html-2022-10-13-09_36_03

When images have the same width but different heights, HTML pages render images with different widths (example 2).

{% include inline_image.html file="C16_136_1.png" alt="Exercício de Leitura e Ditado" %}
{% include inline_image.html file="C16_136_2.png" alt="Exercício de Leitura e Ditado" %}

screencapture-127-0-0-1-4000-mydoc-c16-06-html-2022-10-13-09_58_09

Is there a way to override this?

bbpezeshki commented 5 months ago

Whether an image is specified with the inline_image.html or in html, with specific dimensions, or in markdown with no image size, HTML pages always render the image identical (example 1)

{% include inline_image.html file="faro.png" max-width="300" alt="Faro, Portugal" %}

<img src="/images/faro.png" width="200" alt="Faro, Portugal">

![Faro, Portugal](/images/faro.png)

screencapture-127-0-0-1-4000-mydoc-c18-10-html-2022-10-13-09_36_03

When images have the same width but different heights, HTML pages render images with different widths (example 2).

{% include inline_image.html file="C16_136_1.png" alt="Exercício de Leitura e Ditado" %}
{% include inline_image.html file="C16_136_2.png" alt="Exercício de Leitura e Ditado" %}

screencapture-127-0-0-1-4000-mydoc-c16-06-html-2022-10-13-09_58_09

Is there a way to override this?

The customstyles.css has a bunch of repeated .post-content img classes (sorry if I'm using the wrong words) that force the image back to 100% size. I just commented all of these out.