# Memory limit

- Source: https://plugstack.dev/docs/pixavif-avif-webp-image-converter/memory-limit/
- Published by: PlugStack
- Last updated: 2026-11-04

Converting a photo needs memory for every pixel. A 24 megapixel photo can need over 200 MB while it is being encoded. With a low PHP memory limit, large photos fail and smaller ones still work.

 

## Raise the limit

 

Add this line to `wp-config.php`, above the line that says “That’s all, stop editing”:

 

```
define( 'WP_MAX_MEMORY_LIMIT', '512M' );
```

 

WordPress uses this higher limit for image work in the admin and background tasks. If your host caps PHP memory lower, the line has no effect; ask your host to raise `memory_limit` to 256M or more.

 

## Then

 
1. 1
   Array
2. 2
   Array
