News:

Looking for documentation? Take a look on our wiki

Main Menu

Image handle in VM2 or VM3

Started by Naturt, October 12, 2015, 09:48:31 AM

Previous topic - Next topic

Naturt

Hello there! My vm2 table (_virtuemart_medias) is over 4500 rows, and near 1MB. I have only 700 product in my webshop.
I can't believe there is no method for deleting unused or deleted products images. If I delete a product, why is the image stay in the folder? Why does not the program delete it? (In VM3 too)

GJC Web Design

QuoteWhy does not the program delete it?

For many already discussed reasons...

Have u searched on here?  There are various posts where people have offered script solutions to check and delete non used images
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

Hi naturt,
QuoteIf I delete a product, why is the image stay in the folder? Why does not the program delete it? (In VM3 too)
The reason is that in VM2 or 3, you can use multiple time same images in different products and the _virtuemart_medias is the reference to the real file.

But of course, it would be a nice feature to have possibility to remove unused files and table référence directly in Virtuemart(and multi upload too).

Regards,
Patrick

Naturt

Hi guys! Thank you for the answers! GJC Web Design I searched for it, but I found only script solutions as you mentioned. I understand the _virtuemart_medias table through the images, but that table -depend on the work what it do- is growing and growing? I think it is not good for long-life webshops or webshops over 10.000 products.
I think about a manually solution: 1. get all of the category/vendor/product images what I use, and delete all of the rows from _virtuemart_medias except thoose ones.