WordPress image gallery upload preview not working error

If you get this error message “An error occurred in the upload. Please try again later.” You’re not alone, I encountered the same problem and did google search and read wordpress support forum and tried all the fix, but what really work and clean are the following steps:

  1. Back database
  2. Make notes of all plugins you installed so it can be re-installed it later
  3. Backup files just in case, especially the images gallery pictures folders.
  4. Delete all files
  5. Empty all data tables
  6. Re-install newest version of WordPress
  7. Empty all data tables again, and restore the original database you backed up earlier.
  8. Now check to see if your Add/Media upload pictures are now working and it’s showing all the pictures. If so proceed to next step, if not then it’s not working for you! you can still go on to next step or just restore original files back up earlier, and get further support
  9. Re-install all plugins, install one by one if you can and test the upload image media files ensure it work before installing more plugins.

The problem appears to be an upgrade of wordpress and could also be a plugins that were installed previously impacted some configuration or files or the database tables.