Created time: 2014-11-04 Last updated time:

I've made image resizing library for the cms contents

When we write online document, the screen capture is very frequently used in it. Then I'm using screen capture software to save the image into the clipboard of the operating system, and paste it on the WYSIWYG editor.

How WYSIWYG editor works

After taking a screen shot with screen capture software, and paste it on the WYSIWYG editor, the picture is saved as base64 encoding string.

Captured image

The long url starts with "data:image/png;base64;" means the url is data which is ping file's one and encoded in base64 format.

After save or publish the contents, the picture file for this url data is generated automatically by the server side program of this content management system.

Resizing image

This content management system supports resizing image automatically. When you specify the width and height in the img tag, the browser adjust the size of image. But is is not good for SEO, because the data size of the image is still large, even if the size showing on the browser is small.

Alinous Document CMS has function to wirte template engine's code on the web browser.

CMS Template code

The "HtmlImage.replaceImage()" function generate small image and replace the image's url of the Html automatically on publish the document html.

This function is very useful, because screen capture software and copy and paste become more useful action.


Go to Top