LaTeX module should specify image dimensions
-
I am using “Beautiful Math with LaTeX” to embed latex equations in my WordPress blog. This plugin module outputs the following image tag:
<img src="https://s0.wp.com/latex.php?latex=..." alt="..." title="..." class="latex" />
It does not specify the height and width attributes for images.
WordPress 5.5 update dynamically adds the height and width attributes to the images created with the Gutenberg editor. Beautiful Math with LaTeX should do the same thing (adding loading=”lazy” width=”…” height=”…” to image tag) for the following two reasons.
(1) Images without the height and width attributes cause CLS (Cumulative Layout Shift), one of Core Web Vitals.
(2) AMP (Accelerated Mobile Pages) requires the dimensions to be specified in the image tag. See, for example, the following page of my blog.
https://www.nagaitoshiya.com/ja/2012/indefinite-integral/amp/
The latex equations in the comment form (No.9) are not displayed. Google Search Console warns me to fix the error of this page.
Is there any way to specify the height and width attributes for the LaTeX images? Or can I request the developers to improve the module?
The page I need help with: [log in to see the link]
- The topic ‘LaTeX module should specify image dimensions’ is closed to new replies.