WordPress.org

Ready to get started?Download WordPress

Forums

Video Thumbnails
Idea: When reseting video thumbnail, delete old or if same, keep old (4 posts)

  1. Daedalon
    Member
    Posted 2 years ago #

    I just noticed there are 2186 thumbnails in my uploads folder created by Video Thumbnails. This on a site with approximately 50 videos. It seems that every time I make VT to retrieve new thumbnails by either resetting the thumbnail on the edit post page or scanning all past posts in the VT options page, nothing happens to the old ones. 2186 files for 50 posts is an exception, since I had been testing a lot while making updates to the plugin, but every user suffers from the same problem to a lesser degree.

    Should we either delete the old one when retrieving a new thumbnail, or keep and use the old one instead if the thumbs are exactly one and the same? This could easily be checked for example by comparing the md5 checksums of the existing file and the new not-yet-written-to-file string.

    http://wordpress.org/extend/plugins/video-thumbnails/

  2. Daedalon
    Member
    Posted 2 years ago #

    For those who want to clear the old files, two things to notice:

    1. Use the patched 1.7.6-daedalon2 version (or possibly a version of Video Thumbnails newer than 1.7.6). Otherwise Video Thumbnails fails to recreate thumbnails for deleted files believing the old ones are still intact.

    2. Delete them through WP Admin Panel's Media page. Don't delete the files straight through FTP or other file system access methods, that leaves "ghost files" of them hanging in WordPress that cause errors while recreating new thumbnails. These "ghost files" you can delete from the Media page just like existing files. From Screen Options at the top you may want to set the amount of items to more than 20. I used 100.

  3. Daedalon
    Member
    Posted 2 years ago #

    After deleting and recreating all thumbnails the blog now has one WP Admin Panel Media item per post and three files in the upload folder per each thumbnail totaling about 150. They take 2 MB of space.

    The 2186 files took something between 50 to 100 MB (a bigger portion of them were full-sized video thumbnails instead of shrunk ones). A smaller webhost account would have been filled by these, so the checks suggested above are warranted.

  4. Sutherland Boswell
    Member
    Plugin Author

    Posted 2 years ago #

    I think the best solution would be to store the image's media library ID in the custom field instead of an absolute path. This would make things a lot more flexible and manageable all around for people who want to delete all video thumbnails, change domains, get different media sizes, etc.

    The fact URLs are stored is a remnant of the early versions when images weren't being saved to the local media library. I think it's about time to drop support for storing non-local URLs.

    Another thing that might help would be custom fields for attachments created by video thumbnails, that way a user could click a button and any media with a field like 'is_video_thumbnail' could be wiped out.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic