Title: Adding media type
Last modified: August 19, 2016

---

# Adding media type

 *  [splotch](https://wordpress.org/support/users/splotch/)
 * (@splotch)
 * [18 years ago](https://wordpress.org/support/topic/adding-media-type/)
 * I am trying to add a Flash media type through my plugin. I’ve used the `post_mime_types`
   filter to add the “Flash” mime type. This correctly adds the Flash tab/link to
   the Media Library page. It also shows that there are X media objects of that 
   type. However, when I click on the link, instead of a list of Flash media objects,
   I get a “No posts found” message.
 * Is there another filter, or action that I need to call to get my Flash objects
   to show up in the Media Library list? Any help, or links anyone can provide will
   be greatly appreciated.

Viewing 1 replies (of 1 total)

 *  Thread Starter [splotch](https://wordpress.org/support/users/splotch/)
 * (@splotch)
 * [18 years ago](https://wordpress.org/support/topic/adding-media-type/#post-768506)
 * Finally figured it out. For some reason typing my questions on this forum seems
   to expedite the process of finding the solution, whether or not someone replies.
 * After digging through the code, I realized that I needed to include the full 
   mime type, not just ‘`flash`‘.
 * Now Flash files show up correctly in the media library. Here’s a simplified snippet
   of the working code.
 *     ```
       function modify_post_mime_types($post_mime_types) {
       	$post_mime_types['application/x-shockwave-flash'] = array(__('Flash', 'swfobj'), __('Manage Flash', 'swfobj'), __ngettext_noop('Flash (%s)', 'Flash (%s)', 'swfobj'));
       	return $post_mime_types;
       }
       add_filter('post_mime_types', 'modify_post_mime_types');
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Adding media type’ is closed to new replies.

## Tags

 * [flash](https://wordpress.org/support/topic-tag/flash/)
 * [media](https://wordpress.org/support/topic-tag/media/)

 * 1 reply
 * 1 participant
 * Last reply from: [splotch](https://wordpress.org/support/users/splotch/)
 * Last activity: [18 years ago](https://wordpress.org/support/topic/adding-media-type/#post-768506)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
