Hi @stefansic, I don’t think this is possible even with a code snippet.
The 1320px is hard-coded here, and then used when processing emails. There are no filters to allow customizing it.
MailPoet doesn’t necessarily need this huge format
The reason for 1320px is that the width of MailPoet emails is 660px, so using 1320px for images covers the 2x resolution for all modern displays so the images look sharp.
Hi Ján,
with this code in function.php it is possible (20 minutes with claude.ai)
// MailPoet Bildgröße auf 600px (medium) ändern – Finale Version
add_filter(‘wp_get_attachment_image_src’, function($image, $attachment_id, $size, $icon) {
// Nur für MailPoet-Anfragen und nur wenn die große Bildgröße angefordert wird
if (defined(‘DOING_AJAX’) && DOING_AJAX &&
isset($_POST[‘action’]) &&
strpos($_POST[‘action’], ‘mailpoet’) !== false &&
$size === ‘mailpoet_newsletter_max’) {return wp_get_attachment_image_src($attachment_id, ‘medium’, $icon);
}
return $image;
}, 10, 4);
The key point is that I am avoiding using oversized image files. With over 2000 products in my shop, I am saving a significant amount of storage space.
Best
Stefan
Hello again @stefansic ,
I can definitely understand wanting to reduce image sizes, especially with a large product catalog like yours. It makes sense that optimizing this could help with storage and efficiency.
That said, offering support for custom modifications like this one does fall outside our support policy. If you’ve been able to find a workaround using Claude.ai and it’s working well for your setup, that’s great to hear. We just wouldn’t be able to provide further guidance or troubleshooting for custom-coded solutions.
If you ever run into any issues with the core functionality of MailPoet or supported features, feel free to reach out. We’ll be happy to help where we can.
I’m going to mark this as resolved, as we haven’t heard back from you in a while. Please open a new thread if you need further assistance.
If you have a few minutes, we’d love if you could leave us a review: https://wordpress.org/support/plugin/mailpoet/reviews/