Getting 500 internal server error – Magento images

Let’s suppose that you copied a magento project to your local server and the images are missing.

Here are some things that you should check it:

  • See what owner is assigned to the media folder. To do that you have to execute the following linux command in your console:
ls -l

To change recursively the ownership of the media folder you have to execute this command:

chown -R username:group media

Do not execute chown -R username:group / 

    • Another issue that  might cause this, is the media folder permissions. You should execute this command:
      chmod -R 777 media/
  • If not of these are working you should check afther a .htaccess file inside the media folder and remove it!
  • Don’t forget to clear the cache from admin panel and also clear the cache from your browser (ctrl+shift+delete).