Item13029: convert inline images to proper attachments on save

pencil
Priority: Enhancement
Current State: Closed
Released In: n/a
Target Release:
Applies To: Extension
Component: ImagePlugin
Branches: master
Reported By: MichaelDaum
Waiting For:
Last Change By: MichaelDaum
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

 

ItemTemplate edit

Summary convert inline images to proper attachments on save
ReportedBy MichaelDaum
Codebase
SVN Range
AppliesTo Extension
Component ImagePlugin
Priority Enhancement
CurrentState Closed
WaitingFor
Checkins ImagePlugin:510a48cba0fc
ReleasedIn n/a
CheckinsOnBranches master
trunkCheckins
masterCheckins ImagePlugin:510a48cba0fc
ItemBranchCheckins
Release01x01Checkins
Topic revision: r1 - 17 Sep 2014, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy