Skip to content
Documentation
Plugin page
Troubleshooting

Memory limit

  • Updated
  • Pixavif: v1.0.0
  • 1 min read

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. Array

  2. Array

Was this page helpful?

Pixavif: AVIF & WebP Image Converter
Explore plugins