Title: Offload audio files only
Last modified: October 4, 2020

---

# Offload audio files only

 *  Resolved [buging](https://wordpress.org/support/users/buging/)
 * (@buging)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/offload-audio-files-only/)
 * Hello,
    Is it possible for this plugin to offload only audio files and not necessarily
   all media? If yes, can it be done with free/pro or both?
 * thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Delicious Brains](https://wordpress.org/support/users/deliciousbrains/)
 * (@deliciousbrains)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/offload-audio-files-only/#post-13532464)
 * Yes, you can achieve this with either WP Offload Media Lite or WP Offload Media
   by using the `as3cf_allowed_mime_types` filter…
 * [https://github.com/deliciousbrains/wp-amazon-s3-and-cloudfront-tweaks/blob/beb2e0f1bba71be7b462a60209e5ff630a57437e/amazon-s3-and-cloudfront-tweaks.php#L478](https://github.com/deliciousbrains/wp-amazon-s3-and-cloudfront-tweaks/blob/beb2e0f1bba71be7b462a60209e5ff630a57437e/amazon-s3-and-cloudfront-tweaks.php#L478)
 * … or the `as3cf_pre_upload_attachment` filter …
 * [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)
 * -IJ
 *  [温唯](https://wordpress.org/support/users/unbosomjam/)
 * (@unbosomjam)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/offload-audio-files-only/#post-13575173)
 * Hi [@deliciousbrains](https://wordpress.org/support/users/deliciousbrains/)
 * Same question.
 * I’ve added these codes :
 *     ```
       function allowed_mime_types( $types ) {
       		// Disallow offload of png.
       		unset( $types['png'] );
   
       		// Allow offload of PDFs.
       		$types['pdf'] = 'application/pdf';
   
       		return $types;
       	}
       ```
   
 * to function.php file to prevent .png from being uploaded to s3 , but it still
   not work , images with .png still be offloaded to s3 bucket.
 * Which step did I missed?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Offload audio files only’ is closed to new replies.

 * ![](https://ps.w.org/amazon-s3-and-cloudfront/assets/icon-256x256.jpg?rev=1809890)
 * [WP Offload Media Lite for Amazon S3, DigitalOcean Spaces, and Google Cloud Storage](https://wordpress.org/plugins/amazon-s3-and-cloudfront/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amazon-s3-and-cloudfront/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/)
 * [Active Topics](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [温唯](https://wordpress.org/support/users/unbosomjam/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/offload-audio-files-only/#post-13575173)
 * Status: resolved