Read the Beforeitsnews.com story here. Advertise at Before It's News here.
Profile image
Story Views
Now:
Last hour:
Last 24 hours:
Total:

Fixing persistent WordPress image upload problems – and saving some disk space too

% of readers think this story is Fact. Add your two cents.


For months this blog has been beset by a problem. Every time I upload an image I would receive the error:

Post-processing of the image failed. If this is a photo or a large image, please scale it down to 2500 pixels and upload it again.

Scaling it down, or increasing the JPG compression, would work in perhaps 1 in 5 cases, but not universally. Sometimes an image would be useable even if the error had shown, and sometimes it would not.

I had assumed this was a memory problem – I only have shared hosting for this blog – but increasing the memory allocation in cPanel (editing php.ini) made no difference. Changing the PHP version made no difference either (see latter points here). Using the Disable “BIG Image” Threshold plugin did not work.

So what did work?

The solution was to add a line of code to functions.php, as outlined here. This is the line:

add_filter( ‘wp_image_editors’, function() { return array( ‘WP_Image_Editor_GD’ ); } );

This forces WordPress to use the GD image editor, rather than ImageMagick.

And it works! Problem solved…

But hang on… messing around with the functions.php file is not very handy, not least because there are still 90 odd WordPress sites running on a server I am responsible for. Were themes to then be updated by my clients – even by accident – the problem will re-occur. Yes, I could make a child theme for each one of them, but that is going to take ages and ages.

So I needed a quick way to add a line to functions.php – and there is a plugin for that. It’s called My Custom Functions and it’s explained here, towards the bottom.

It works. Image uploads now fixed in a simple and upgrade-proof manner.

But then what to do about clients uploading massive images – and using up loads of disk space and potentially also bandwidth as a result? Here I have come across a further plugin – Imsanity – that force resizes images according to user set parameters, saving on disk space. The combination of the two works just fine.

The post Fixing persistent WordPress image upload problems – and saving some disk space too appeared first on Jon Worth Euroblog.


Source: https://jonworth.eu/fixing-persistent-wordpress-image-upload-problems-and-saving-some-disk-space-too/


Before It’s News® is a community of individuals who report on what’s going on around them, from all around the world.

Anyone can join.
Anyone can contribute.
Anyone can become informed about their world.

"United We Stand" Click Here To Create Your Personal Citizen Journalist Account Today, Be Sure To Invite Your Friends.

Please Help Support BeforeitsNews by trying our Natural Health Products below!


Order by Phone at 888-809-8385 or online at https://mitocopper.com M - F 9am to 5pm EST

Order by Phone at 866-388-7003 or online at https://www.herbanomic.com M - F 9am to 5pm EST

Order by Phone at 866-388-7003 or online at https://www.herbanomics.com M - F 9am to 5pm EST


Humic & Fulvic Trace Minerals Complex - Nature's most important supplement! Vivid Dreams again!

HNEX HydroNano EXtracellular Water - Improve immune system health and reduce inflammation.

Ultimate Clinical Potency Curcumin - Natural pain relief, reduce inflammation and so much more.

MitoCopper - Bioavailable Copper destroys pathogens and gives you more energy. (See Blood Video)

Oxy Powder - Natural Colon Cleanser!  Cleans out toxic buildup with oxygen!

Nascent Iodine - Promotes detoxification, mental focus and thyroid health.

Smart Meter Cover -  Reduces Smart Meter radiation by 96%! (See Video).

Report abuse

    Comments

    Your Comments
    Question   Razz  Sad   Evil  Exclaim  Smile  Redface  Biggrin  Surprised  Eek   Confused   Cool  LOL   Mad   Twisted  Rolleyes   Wink  Idea  Arrow  Neutral  Cry   Mr. Green

    MOST RECENT
    Load more ...

    SignUp

    Login

    Newsletter

    Email this story
    Email this story

    If you really want to ban this commenter, please write down the reason:

    If you really want to disable all recommended stories, click on OK button. After that, you will be redirect to your options page.