Item13029: convert inline images to proper attachments on save
Priority: Enhancement
Current State: Closed
Released In: n/a
Target Release:
Applies To: Extension
Component: ImagePlugin
Branches: master
Inline images, that's stuff like
<img src="data:image/jpeg;base64,DATA">
The plugin now optionally extracts
DATA
and properly attaches it to the topic where it was found. Filenames for generated attachments are based on an MD5 checksum of the image DATA plus the corresponding suffix for the given mime type.
The original
< img ...>
tag is replaced with appropriate makro pointing to the attachment.
By default this is a new
<img ..>
tag again - NOT an
%IMAGE
makro call - as
%IMAGE
makros aren't wysiwyged. You may however change this default using a configuration such as
$Foswiki::cfg{ImagePlugin}{InlineImageTemplate} = '%IMAGE{"%ATTACHMENT%" topic="%WEB%.%TOPIC%"}%';
for server-side conversion and downsizing images.
--
MichaelDaum - 17 Sep 2014