rtCamp / rtMedia

rtMedia (formerly Buddypress Media) adds advanced multimedia functionality to WordPress, BuddyPress and bbPress
https://rtmedia.io/
123 stars 111 forks source link

media cleanup #1975

Open felixtech-msp opened 1 year ago

felixtech-msp commented 1 year ago

Is your feature request related to a problem? Please describe. WordPress and rtMedia procude for every image uploaded around 10 copies in total. I have around 78k photos according to rtMedia but over 800k files in the uploads folder. This bloats the filesystem so much that it becomes extremely slow and full.

Describe the solution you'd like

  1. A way that rtMedia prevents WordPress from doing it's own image resizing crap.
  2. A way to clean up that garbage media files (including WP own garbage and rtMedia's unselected image crop sizes).
  3. A way to cleanup/optimize/shrink rtMedia database tables.
pavanpatil1 commented 1 year ago

Hi @felixtech-msp,

Thanks for your suggestion.

I will forward this suggestion to my team and will need to check the likelihood of adding this feature in future releases.

Thanks!

felixtech-msp commented 1 year ago

Is there maybe any quick fix for this? All the created garbage produces catastrophic performance problems (page load time of ~ 5.7 seconds) from selecting so much stuff from the database and loading way too much images to the client.

felixtech-msp commented 4 months ago

Is there any progress on that? Or website is frequently crashing because of the bloard rtMedia folder.

pavanpatil1 commented 4 months ago

Hi,

Thank you for your patience. We are currently working on finding a solution for it. Hopefully, we will make a fix for it in upcoming releases. I'll keep you updated if we make any progress.

Thanks.

abhishekfdd commented 4 months ago

Hi @felixtech-msp

Can you share a bit more details like are you currently using the free version or the paid version of rtMedia, also are you using any add ons.

felixtech-msp commented 4 months ago

As far as I'm aware our customer uses the free version and no special addons.

Pradeep1308 commented 4 months ago

Hi @felixtech-msp

By default, rtMedia creates four image sizes in addition to the original image. Additionally, any custom image sizes that are registered in the WordPress theme or by other plugins will also generate corresponding image copies.

A possible solution is to disable unused image sizes using the intermediate_image_sizes_advanced filter and then use the plugin https://wordpress.org/plugins/regenerate-thumbnails/ and then run Regenerate thumbnails with these options selected

  1. Skip regenerating existing correctly sized thumbnails.
  2. Delete thumbnail files for old unregistered sizes to free up server space.

Note : Regenerate thumbnail will only work with WordPress media library and won't work for a s3 bucket.