alexmurray / emacs-snap

GNU Emacs in a snap
https://snapcraft.io/emacs
71 stars 13 forks source link

Unable to resize images on org export to html #72

Closed dmusican closed 8 months ago

dmusican commented 8 months ago

I'm trying to export an org file to HTML using the #+ATTR_HTML attribute to resize an image, and it's simply having no effect. From the searching that I've been doing, my best understanding is that it's because Emacs isn't using imagemagick correctly, which is needed to resize images for HTML export within org. I can confirm that via

(image-type-available-p 'imagemagick)

which returns nil. Has the snap been built with imagemagick support, and if so, is there a way that it can be enabled?

alexmurray commented 8 months ago

I have purposely not built the snap with imagemagick support since even upstream emacs does not recommend this anymore, and imagemagick is a constant source of security vulnerabilities so this reduces the attack surface for emacs.

dmusican commented 8 months ago

Thanks for the quick response, which I appreciate, and for the security concerns. This does significantly reduce my ability to use emacs for generating HTML documents since it doesn't allow me to control sizing of embedded images, but that's obviously out of scope of this snap project. Are you aware of any workarounds for that? I haven't been able to find any. When searching, the advice I consistently come across is to recompile with imagemagick support enabled.

alexmurray commented 8 months ago

Sorry I am not sure, it might be worth asking on emacs-devel since it was the upstream emacs developers who deprecated imagemagick support and introduced the new native image API in emacs.