If someone who have
already deleted some product or a category or a manufacturer without
unmapping the mapped images first so now she cannot remove the images from the Resource Library (including the demo ones) -- if you really need to remove it, a workaround is to find & delete its orphaned mapping in database. Here's what we came up with:
1. backup your sql database, or at least resource_map table:
http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html2. find and delete the orphaned mappings for the imagery somehow... e.g. by their naming pattern. below is what we did for the images remaining from demo products/categories/manufacturers -- those objects have been already removed everywhere in our Admin panel a while ago (we did not know we should have unmapped the images first in the Library at that time):
mysql> delete from ac_resource_map where resource_id in (select resource_id from ac_resource_descriptions where name like '%demo_%');
mysql> delete from ac_resource_map where resource_id in (select resource_id from ac_resource_descriptions where name like 'mf_%');
Then we could remove the graphics as usual in the Admin via Resource Library (in our case, there were 304 demo images found by 'demo_', and a few our owns). Cleaning things via the Library interface (not in db!) correctly deleted their related files in public_html/resources/image directory.
Of course it is up to you to be careful(!) and not delete real mappings and all.. Please always try Lee's solution first before messing with database: try to unmap the images in the Library as you normally do in the Admin first, see if it helps you remove the graphics in usual way. If your not sure what your doing, don't break your db and wait for official fixes. Since the issue isn't only to demo images but to all kinds of resources in Library, hopefully this is going to be fixed in the upcoming releases.