Title: Offloading Media
Last modified: April 26, 2022

---

# Offloading Media

 *  [bonumaster](https://wordpress.org/support/users/bonumaster/)
 * (@bonumaster)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/offloading-media/)
 * Hello. I was using this great plugin and WP Offload Media Lite Plugin to serve
   faster media. I was using Videopack for watermarking videos and I wanted to offload
   videos that has been processed on watermarking.
 *  I asked the author of WP Offload Media and he said that
 * > WP Offload Media should re-offload the images after they have been processed,
   > but it does depend on whether the watermarking process calls one of the functions
   > that triggers the re-offload.
   > If it’s your own custom code that does the watermarking, then please ensure
   > that after the files for a Media Library item have been processed that your
   > code does something like the following…
   > wp_update_attachment_metadata( $item->ID, wp_generate_attachment_metadata( 
   > $item->ID, $file ) );
   > The important call there is wp_update_attachment_metadata(), if you already
   > have the attachment’s metadata you don’t need to regenerate it, just pass it
   > in.
   > WP Offload Media will see the wp_update_attachment_metadata filter fired by
   > the function of the same name, and copy the attachment’s file to the bucket,
   > overwriting the previous versions if already offloaded.
   > I would recommend using the as3cf_pre_upload_attachment filter to cancel the
   > original offload though, and then remove that filter before doing the final
   > wp_update_attachment_metadata. That way you don’t waste time offloading to 
   > the bucket and re-offloading again, and it ensures CDNs only see the final 
   > watermarked files.
   > [https://deliciousbrains.com/wp-offload-media/doc/developer-guide/#automatic-offload-hooks-wp-update-attachment-metadata](https://deliciousbrains.com/wp-offload-media/doc/developer-guide/#automatic-offload-hooks-wp-update-attachment-metadata)
   > [https://github.com/deliciousbrains/wp-amazon-s3-and-cloudfront-tweaks/blob/beb2e0f1bba71be7b462a60209e5ff630a57437e/amazon-s3-and-cloudfront-tweaks.php#L528](https://github.com/deliciousbrains/wp-amazon-s3-and-cloudfront-tweaks/blob/beb2e0f1bba71be7b462a60209e5ff630a57437e/amazon-s3-and-cloudfront-tweaks.php#L528)
   > If you’re using a watermarking plugin, might be worth passing the above info
   > onto the author if you’re seeing issues.
   > -IJ
 * I wanted the videos watermarked to be offloaded while there are still in queue.
   Does this plugin works as the author said ?
    Thanks a lot!
    -  This topic was modified 4 years, 1 month ago by [bonumaster](https://wordpress.org/support/users/bonumaster/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Kyle Gilman](https://wordpress.org/support/users/kylegilman/)
 * (@kylegilman)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/offloading-media/#post-15596487)
 * What has been your experience so far? I can’t quite tell what you would like 
   to change about the process.
 * I’ll see if I can add the `as3cf_pre_upload_attachment` filter to avoid offloading
   videos twice. It would only work for videos that are set to be automatically 
   encoded by Videopack when you upload them.

Viewing 1 replies (of 1 total)

The topic ‘Offloading Media’ is closed to new replies.

 * ![](https://ps.w.org/video-embed-thumbnail-generator/assets/icon.svg?rev=2965979)
 * [Videopack](https://wordpress.org/plugins/video-embed-thumbnail-generator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/video-embed-thumbnail-generator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/video-embed-thumbnail-generator/)
 * [Active Topics](https://wordpress.org/support/plugin/video-embed-thumbnail-generator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/video-embed-thumbnail-generator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/video-embed-thumbnail-generator/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Kyle Gilman](https://wordpress.org/support/users/kylegilman/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/offloading-media/#post-15596487)
 * Status: not resolved