NewsletterBuilder and Images

I recently moved a site we have hosted for years to a new server. Everything seemed to be working fine after the migration.

However, I have just now noticed an issue. I realize that it may not be related to the move, but I have not been able to find the problem.

When one creates a message in NewsletterBuilder that includes an uploaded image or a resource referenced by url, the message received just has a placeholder for the image and a blank area in the email for the url resource. This occurs with any email client and regardless of client settings. Interestingly, the image appears correctly in the NLB record's message field.

I checked to see if the images are being uploaded to the upload directory and find that they are.

I do notice that the names of the files appear to have been changed to all lowercase on upload by the plugin, but I am assuming that the email generated by the plugin must then reference the images with these new names. Is this correct?

This seems as though it should be a path error of some kind, but I don't see anything in the NLB.php file itself or the plugin interface that allows one to see or alter any path references.

(Also of note is the fact that graphics we have placed inside templates for use in our newsletters also do not appear in received messages..)

Any help would be much appreciated.

By Dave - September 2, 2023

Hi pgplast, 

Hmm, yea that's a curious one.  I haven't seen that issue before.  You could examine the source of the messages received by the email applications, as well as the source of the HTML under the log here: admin.php?menu=_outgoing_mail  (you may need to enable logging)

There are some options for including relative or absolute URLs, but it sounds like the issue you're having is that files are being renamed to lowercase on upload?  So the message source references potentially mixed case files and the uploaded files are all lowercase? 

Can you confirm that?  And if so confirm if it's lowercasing just the filename or the filename and ext.  For example, does FILENAME.GIF become filename.gif.

I'm not aware of anything that would be cause the files to be renamed, but if you can confirm it we can look into it further.

Let me know what you find out!

Dave Edis - Senior Developer

Hi, Dave. Thanks for the reply.

It seems that when I add an image to the WYSIWYG editor in NLB message, the nme oif the file is immediately changed to all lowercase.

e.g. CMECalendarQR.png, becomes cmecalendarqr.png.  (This happens for CMECalendarQR.PNG as well)

This change is refelected immediately in the tinyMCE editor and comes across in the raw code of the received email.

When the remote server is checked via FTP, the uploads folder for CMSB also has cmecalendarqr.png, and so one wonders why the file as referenced in the email does not appear.

<div class=3D"content"><p><img src=3D"https://nypq=" width=3D"410" height=3D"422" a=
lt=3D"" /></p><br /><br /></div>

While my first assumption was that this was a path or case error, it doesn't appear so based upon this.


After a fresh install of Thunderbird, I find I am able to see images sent in the mailings. However, no amount of messing with the settings of Mac Mail will show ther images.

In any event, this issue should be closed for you guys.

If anyone has encountered this behavior on a Mac, your advice would be appreciated!

It seems that another issue occurs that may be related to this one.

I get the following error sent to me when a .png file is uploaded to the newsletter.

Sep 14th, 2023 - 12:11:09 PM
E_WARNING: imagecreatefrompng(): gd-png: libpng warning: Interlace handling should be turned on when using png_read_image
/home/pgplast/public_html/cmsCSoft/lib/image_functions.php (line 42)


By Dave - September 16, 2023

Hi pgplast, 

I don't have a Mac, but maybe double-check these settings: 

  • Load Remote Content in Messages: Go to Mail > Preferences > Security. Check the box next to "Load remote content in messages."
  • Display Remote Images in Individual Emails: When you open an email with remote content, look for a banner at the top of the email. Click the "Load remote content" button to manually load the images for that specific email.
  • Also check this page about the "protect mail activity" setting:

For the warning, can you let me know if you're running the latest version of CMSB? And/or add a @ in front of imagecreatefrompng on the line number reported by the error? 

case IMAGETYPE_PNG:  $sourceImage = @imagecreatefrompng($sourcePath); break;

I think that one is a bug in the underlying code and not indicative of an error.

If you have @ in front and it's still reporting errors let us know.

Dave Edis - Senior Developer