How to Permanently Delete Images from Magento 2.x

Created: 17 Dec 2020 Author: Thanh Duong Category: Magento 2

Below is the short guide on how to permanently delete images from your website on Magento 2.x

  • Step 1: Find the original path of the images
    • Go to images, right click on the image that you want to delete >> Open image in new tab
      Screen 1
    • You will see the URL as below
      Screen 2
    • So now, we know that this specific image is located at pub/media/tmp/catalog/product/1/4/
      file name is pokemon-squirtle-png.jpg
  • Step 2Delete the image from both backend & cPanel storage
    • To delete the images from backend, click on the dustbin icon >> Save
      Screen 3
    • To delete the images from cPanel storage, Go to File Manager >> trace the location above >> look for the names of the images
      In this context, our images are at pub/media/tmp/catalog/product/1/4/
      This folder is under public_html
      Screen 4
      Screen 5
    • After you have found the image files, select the respective files, press Ctrl while clicking to select multiple files.
      Select X Delete on top to delete the selected files from cPanel Storage
      Screen 6
  • Step 3: Flush Magento Cache
    • Now we go back to Magento back-end and access Cache Management
      Screen 7
    • Select All >> Flush Cache Storage
      Screen 8

Now, the images should be permanently deleted from both your website’s back-end and cPanel Storage.


Fun Fact about Verz Design:

Verz Design is the top eCommerce web development company in Singapore and has the expertise to build an eCommerce website using these 3 platforms: WooCommerce, Magento and Shopify. We are the only pre-approved PSG grant for ecommerce website using Magento.

Love what you've seen?
Contact us to start your journey to Excellence today!