Title: Resize WP_Mail Attachments
Author: Patabugen
Published: <strong>April 9, 2019</strong>
Last modified: Juni 23, 2022

---

Search plugins

![](https://ps.w.org/resize-wp-mail-attachments/assets/banner-772x250.png?rev=2065671)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/resize-wp-mail-attachments/assets/icon-256x256.png?rev=2065671)

# Resize WP_Mail Attachments

 By [Patabugen](https://profiles.wordpress.org/patabugen/)

[Download](https://downloads.wordpress.org/plugin/resize-wp-mail-attachments.zip)

 * [Details](https://su.wordpress.org/plugins/resize-wp-mail-attachments/#description)
 * [Reviews](https://su.wordpress.org/plugins/resize-wp-mail-attachments/#reviews)
 *  [Installation](https://su.wordpress.org/plugins/resize-wp-mail-attachments/#installation)
 * [Development](https://su.wordpress.org/plugins/resize-wp-mail-attachments/#developers)

 [Support](https://wordpress.org/support/plugin/resize-wp-mail-attachments/)

## Description

All email providers have a maximum email size. Postmark – for example – have a hard
limit of 10mb.

For usability, it’s best not to ask your visitors to do their own image resizing.
This plugin will automatically reduce any images (specifically anything which can
be edited with the WP_Image_Editor) a little at a time to try and fit the limit.

## Installation

 1. Upload the plugin directory `resize-wp-mail-attachments` to the `/wp-content/plugins/`
    directory or install it directly from the WordPress plugin directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. The plugin automatically starts working – there is no admin or settings screens.
    See Frequently Asked Questions if you’d like to change any settings.

## FAQ

### How do I change the size limits

You can use these filters to customise settings, here the filter names are listed
with their defaults.
 resize_wp_mail_attachments_max_total_size = 10 (megabytes)
resize_wp_mail_attachments_fit_max_attempts = 5 resize_wp_mail_attachments_fit_reduction_amount
= 0.98

For exampple, to set the email size to 25mb add code like this to your functions.
php:

    ```
        add_filter('resize_wp_mail_attachments_max_total_size', function(){ return 25; });
    ```

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Resize WP_Mail Attachments” is open source software. The following people have 
contributed to this plugin.

Contributors

 *   [ Patabugen ](https://profiles.wordpress.org/patabugen/)

[Translate “Resize WP_Mail Attachments” into your language.](https://translate.wordpress.org/projects/wp-plugins/resize-wp-mail-attachments)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/resize-wp-mail-attachments/),
check out the [SVN repository](https://plugins.svn.wordpress.org/resize-wp-mail-attachments/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/resize-wp-mail-attachments/)
by [RSS](https://plugins.trac.wordpress.org/log/resize-wp-mail-attachments/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.2

 * Tested on WordPress 6

#### 1.1

 * Fixed: Path does not include directory separator

#### 1

 * Initial release

## Meta

 *  Version **1.2**
 *  Last updated **4 years ago**
 *  Active installations **Fewer than 10**
 *  Tested up to **6.0.16**
 *  PHP version ** 5.3 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/resize-wp-mail-attachments/)
 *  [Advanced View](https://su.wordpress.org/plugins/resize-wp-mail-attachments/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/resize-wp-mail-attachments/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/resize-wp-mail-attachments/reviews/)

## Contributors

 *   [ Patabugen ](https://profiles.wordpress.org/patabugen/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/resize-wp-mail-attachments/)