When I toggle inline image using org-toggle-inline-images
which shows the image(s). However, when the image it too large it will overflow the editor's frame (See screenshot below).
How to make the image responsive which means the max size of the image should never exceed the width of window size.
Of course, I can use the code below to fix the size of the image. But what I truly want is some kind of responsive image displaying.
(setq org-mode-actual-width 600)
Thanks for your time viewing this question.
From the documentation of org-image-actual-width
:
Documentation:
Should we use the actual width of images when inlining them?
When set to t, always use the image width.
When set to a number, use imagemagick (when available) to set
the image's width to this value.
When set to a number in a list, try to get the width from any
#+ATTR.* keyword if it matches a width specification like
#+ATTR_HTML: :width 300px
and fall back on that number if none is found.
When set to nil, try to get the width from an #+ATTR.* keyword
and fall back on the original width if none is found.
So you could use the attribute #+ATTR_HTML to specify the width. It has to be specified manually though. Is this responsive enough?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With