I encountered the same issue – not with automatic mails, but when inserting a blog post into the newsletter body.
I was told by the awesome support team that it’s “one of the most important thing to be improved”, and should be fixed in the near future.
However, Wysija being open source software, I had a look at the inner workings of the plugin, to see if I could maybe come up with a fix. And – surprise! – here we go:
Using version 2.5.4, in the file helpers/articles.php
,
at line 209, you should see this:
$image_info = wp_get_attachment_image_src($post_thumbnail, 'single-post-thumbnail');
Actually, that single-post-thumbnail
value should refer to a registered image size, but for some reason, it has never been defined. Therefore WordPress simply ignores it, and wp_get_attachment_image_src() outputs the “full” image instead.
The Solution:
Replace “single-post-thumbnail” with an existing image size. That could be “large” (defaulting to 1024px wide) or “medium” (defaulting to 300px wide), or “thumbnail”, or some custom image size that you would define with add_image_size().
Or we can use the custom size that is already defined by Wysija, named “wysija-newsletters-max”, which is 600px wide. It’s being used when you insert an image into the newsletter from the “Images” tab, in the editor sidebar.
This sounds good to me, knowing that the actual image size in the newsletter will be 325 px wide, and taking in account retina screens, we should use a slightly wider image. Also, I don’t want to register a gazillion of additional custom image sizes, so let’s reuse this one.
So my changed line looks like this:
$image_info = wp_get_attachment_image_src($post_thumbnail, 'wysija-newsletters-max');
I hope this helps for now, and will allow our end users to send their awesome newsletters with decently sized images, until we get an official fix from the Wysija team.