|
From: Günter M. <mi...@us...> - 2025-04-23 18:57:49
|
This approach would add a level of complexity that makes it more suitable for an extension or a custom HTML writer than for standard Docutils. Some alternatives come to mind: A "simple script" could also be used to pre-process the rST source or post-process the generated HTML to add image dimensions instead of generating sidecar files. A custom HTML writer may add image dimensions by reading from the image file for all image elements that do not have at least one of the "width", "height" or "scale" options. An editor macro may insert a template with :width: and :height: either read from the image file or set to a fixed default. (Since [feature-requests:#102] is fixed, Docutils 0.22 will support CSS style-sheet rules to override :widht: and :height: if these use unitless values.) --- **[feature-requests:#113] scale option in docutils.conf** **Status:** open **Group:** Default **Created:** Mon Apr 21, 2025 08:39 PM UTC by Aaron Schif **Last Updated:** Wed Apr 23, 2025 02:50 PM UTC **Owner:** nobody I would like all the images in the generated html to have width and height attributes to prevent content flashes. This is especially important with `loading: lazy`. The code to do this already mostly exists, but would be automatic if only I could set a default to `scale: 100%'. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |