Translations of this page:

Inline Images

—- plugin —-

description: Allows embedding attached images into the content of messages. No longer supported.
author : Arnold Lesikar
email : alesikar@mac.com
type :
lastupdate : 2015-10-05
compatible : 3.x
depends : PHP 5.x
conflicts :
similar :
tags : inline, embedded, image, attachment,

downloadurl: https://github.com/arnoldle/phplist-plugin-inlineImagePlugin/archive/master.zip
bugtracker : https://github.com/arnoldle/phplist-plugin-inlineImagePlugin/issues
sourcerepo : https://github.com/arnoldle/phplist-plugin-inlineImagePlugin/
donationurl:

screenshot_img :


Images can be embedded in the content of messages or in a template or footer as inline attachments, merely by putting the image tag into the CSS class “inline”. There is a limit of 100kB on the total size of all such inline images attached to a message.

Change Log

  • 1.0a1 - Still in final testing; modifications may still be made
  • 1.0a2 - The first public release
  • 1.0a3 - Fixed a minor problem in listing uploaded images
  • 2.0a1 - A complete redesign with very great simplification of the plugin.
  • 2.0a2 - Fixed a typo producing a database error message when a campaign is queued
  • 2.0a3 - Fixed a serious logic error that could result in jumbling the order of image appearance in a message. Also now allow for re-editing suspended messages
  • 2.0a4 - Test messages now show the inline images. Images are not attached to messages for users preferring plain text. Oldest image files are removed when image directory exceeds 5 MB.

The author has given up Phplist development. This plugin is no longer actively supported

Installation

Updating from Version 1

Before installing the new version, be sure to disable the current version on the plugins page of Phplist.
Upload the new version manually. Then reload the plugins page and enable the new version. The database will be updated when the new version is enabled.

Installing the Plugin in the Absence of Version 1

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin.

Instead of using the installer, you can download the files using the URL above, unzip them and then upload the file inlineImagePluginPlugin.php to the admin/plugins subdirectory of phplist. Once the plugin is enabled, it will itself create the additional subdirectories needed.

And of course make sure that this plugin is enabled, before you attempt to use it.

This plugin adds two tables to the Phplist database, one named '<Prefix>_inlineImagePlugin_image' and the other named '<Prefix>_inlineImagePlugin_msg' where <Prefix> is the Phplist prefix, the same for all tables of the database.

Configuration and Settings

None.

Discussion

Embedding images into a message is now very simple. Just lay out your message with images as you normally would. Once you are satisfied with the layout, then use the editor to go into the source. Then for each embedded image that you want to attach to the message, edit the image tag to be a member of the CSS class “inline”.

As an example, suppose you have the following image tag in your message:

<img src="http://myserver.com/myimages/animage.jpg" width="100" height="80" alt="An ad banner" />

You can attach this image to your message merely by inserting 'class=“inline”' into the tag, as follows:

<img src="http://myserver.com/myimages/animage.jpg" width="100" height="80" alt="An ad banner" class="inline" />

You can put the class property anywhere in the tag that makes valid HTML. If, for some reason, there is already a class attribute in the tag, merely add 'inline“ to the classes listed. So

<img src="http://myserver.com/myimages/animage.jpg" width="100" height="80" class="myclass" alt="An ad banner" />

would become

<img src="http://myserver.com/myimages/animage.jpg" width="100" height="80" class="inline myclass" alt="An ad banner" />

Images that belong to the class “inline” are automatically loaded into the plugin when the message is queued for sending. The image file for each image is attached to the message, and the src attribute of the HTML tag for that image is modified to point to the corresponding attached file.

NOTE WELL: the 'src' attribute for each image must be an absolute URL. Relative URLs for the local file system are not supported.

The plugin restricts the total size of all the images attached to the message. The total size cannot be larger than 100kB. You will not be allowed to put your message in the queue for sending if this limit is exceeded.

There is no special procedure for inserting inline images into a template. Merely put your image tag into the template or a footer and make the image tag a member of the CSS class “inline”, as described above.

You can use this procedure instead of the method given in the Phplist documentation. But note well that any images belonging to the CSS class “inline” embedded in the template or footer count against the limit of 100kB total imposed by the plugin for all the inline images attached to a message.

Test Messages

You can send a test message that will show your inline images exactly as they will appear in the message sent out to your subscribers.

If attempting to send a test message results in a error message:

Sending test blocked by plugin inlineImagePlugin”,

then there is something wrong with one or more images that you have embedded in the message. If there is such a problem, the plugin will not allow the message to be queued for distribution.

The reason for this message will be written to the System Event Log.