How to Embed Images in HTML Email?

Installed phpList 3.6.14 on Linux server running php 8.1 is sending mail but not showing images.

No combination of settings seems to work with CKEditor, TinyMCE, or fckphplist.

Thanks in advance for any light you can shed here.

If you view the HTML source of an email, what is wrong with the URLs in the img elements’ src attributes?

Thanx for the prompt response duncanc! Many combinations of Editor Plugins and Config settings produced a variety of results, from “missing image” outlines appearing in Mac Mail (images appeared on webmail) to “template only” emails with no content at all.

Going back to the plugin list I see:

Dependency checkPlugin can not be enabled.
Failure on system requirement EMBEDEXTERNALIMAGES should not be enabled

Can you help with what causes this, and how to fix it? Thanx in advance for your help.

You cannot use the embed remote images plugin if you have already set EMBEDEXTERNALIMAGES set in the config.php file. You don’t need both.

If an embedded image is not being displayed then it is likely a restriction of the email client. Usually it is best not to embed images.

As duncanc stated look at the HTML source

In our system we did not activate a plugin for this.
We simply put a line like this in the html mails we send:

img border=“0” src=“

add brackets, < >, at the start and end of the line to show the image of course:

Maybe this helps.

Ahoy matey!

My last test shows the image on Gmail via the Safari web browser, but not in the Mac Mail Client.

In the later I get “…src=3D"https://…” ; a “3D” stuck into URL for the image.


That is usual, it is quoted-printable encoding.

Usual or not, it is the code in Mac Mail from a test with missing image. Methinks recent updates to that email client (and some others) prevent tracking by not allowing any remotely-hosted images - tracking pixels and content images. Newsletters I get from others with embedded images come through with images displaying correctly for headers, content, logos, etc. What must I change to achieve this result?

Checking images from other newsletters with images displaying shows the same code, so it’s most likely not an email client issue after all. Hmmm…

In Manage plugins, under embedremoteimages, I have:
Dependency checkPlugin can not be enabled.
Failure on system requirement EMBEDEXTERNALIMAGES should not be enabled

What system - php or ??? What requirement is wrong/missing? How to correct?

Thanks Peter-sdl. Do you create the content in raw html, or are you using a WYSIWYG editor?

CKEditor and Tiny MCE both add brackets to the source code around remote image urls. The images show int the Composition window of each editor by my configuration does not seem to be embedding the images in the message it sends.

FWIW: Also have AcyMail component installed in Joomla! on the same server and it sends to all accounts w/ the images embedded, indicating that the php install on the server is correct. I think.

@68FordXL I put the raw html in the phpList web interface. I use the Firefox browser.

Both the EMBEDEXTERNALIMAGES setting and the Embed remote images plugin handle only remote images - those that are not on the phplist server. Images on the phplist server are not embedded, so I don’t think that you can get exactly the result that you are looking for.

I forgot about the EMBEDUPLOADIMAGES setting, which will embed images that have been uploaded through the editor and are within the directory identified by the UPLOADIMAGES_DIR setting in config.php.
You might want to try this before the approach below

Another Update

I have just added a feature to Common plugin that embeds any image that has a class attribute of embed. That will handle both local and remote images. See the plugin documentation

You need to upgrade Common plugin to the new release and install and enable the Cache plugin. Also, disable any other approaches to embedding images to avoid any clash.

Reinstalled phpList. Added Logo to Template and it now shows up in the email source code as:

<img src=3D"cid:7c34afd1821cff83b303099d7907cea=

4" style=3D"border:none;-ms-interpolation-mode:bicubic;max-width:100%">

Images uploaded to server via CK Editor show up in Content for editing but not in the email received.

CKEditorPlugin 2.6.9+20230518, CommonPlugin 3.30.0+20231014, embedremoteimages 0.1 are Installed, all others are off.

define(‘EMBEDUPLOADIMAGES’,true) added to config - sent as HTML = no image (but remote url in source code); HTML, with remote images embedded fails

updated Common plugin / same result

Do not have cache plugin

Still struggling here. LOGO for company embeds in the template correctly; images in the CONTENT do not Embed, despite update to latest CKEditor and Common Plugin. Embed class produces no image.

Can someone publish their config that works, or suggest other things to check. Thanks in advance.

@68FordXL These two lines in config.php and the embed remote images plugin disabled give me embedded images

define('EMBEDUPLOADIMAGES', true);


define(‘EMBEDUPLOADIMAGES’, true); was missing from Config - everything working fine now!

Thanks a million!