Media Library is a WordPress panel that display all files you've sent. There you can add ne files, attach files to posts and pages etc

learn more… | top users | synonyms

22
votes
4answers
4k views

Add a menu item to Wordpress 3.5 Media Manager

How can add a new menu item underneath the "insert From URL" on the left sidebar in the new Wordpress 3.5 Media Manager? I've been looking at the backbone js and tried my hand at hooking into it with ...
20
votes
5answers
7k views

Change the default-view of Media Library in 3.5?

When inserting media into a post, is there a way to change the default-view of the Media-Library from "All media items" to "Uploaded to this post"? There is another thread where this question was ...
16
votes
2answers
10k views

How to Protect Uploads, if User is not Logged In?

I use wordpress for a private site where users upload files. I use the "Private WordPress" to prevent access in to the site if the user is not logged in. I would like to do the same to the files ...
15
votes
2answers
2k views

Enhance Media Manager for Gallery

I would like to enhance the Media Editor, after WordPress 3.5, on the gallery view. I want to add a new select field on the right side and send the selected values to the gallery shortcode. I ...
12
votes
2answers
837 views

Trigger refresh for new media manager in 3.5

I'm trying to figure out how it's possible to 'refresh' the media library in the new media dialogue in 3.5. I'm adding images from an external image library to the WordPress library (via a tab/iFrame ...
10
votes
4answers
2k views

Unwanted media library URLs in posts?

When doing a bit of Google searching for content on our blog, I noticed to my shock and horror that individual images from the Media Library are somehow generating their own URLs that Google is ...
10
votes
5answers
2k views

Minimum Dimensions Requirement for Featured Image?

I am creating a baseball website with multiple Authors. From past experience, no matter how well you know someone personally, it doesn't mean they will follow or even read your instructions. That ...
10
votes
2answers
22k views

Media Library plugins for better file management? [closed]

Is there any plugin to extend the basic functionality of the Media Library for websites with a lot of media content? A folder structure would be awesome...at the moment I am using the Media Tags ...
9
votes
3answers
8k views

How to add subfolders in media library for better organisation?

Right now I cannot create any subfolder e.g. reviews, news, interviews etc. I have a lot of images in my media library and it's messy. How can I create some folders and reorganize the images there?
9
votes
2answers
363 views

Delete an attachment in the WP media modal window

I'm trying to create an option in the WP modal media window to detect duplicate files and delete a newer file if an older duplicate is found. I have the following code working (in conjunction with the ...
7
votes
5answers
35k views

Get All Images in Media Gallery?

Is there a way to fetch the URLs of ALL images in the media gallery? I think this would be an easy way for a website to have a Pictures page that just pulls all of the images from the media gallery, ...
7
votes
2answers
10k views

WordPress 3.5: Setting custom “full URL path to files” in the Media Library?

As the recent changes in WordPress 3.5 removed the "full URL path to files" option from media library I am wondering how to set this option to a custom path now? I need to set my "full URL path to ...
7
votes
2answers
2k views

Give users a maximum upload capacity; limit the number of files a user can upload OR limit the number of files per upload

I'm using the Media Library on the front end of my website and I'd like to stop users from being able to spam my server by uploading an unlimited number of files. As such, I'd like to do one or maybe ...
7
votes
2answers
1k views

Remove “Insert from URL” link in Media upload - WP 3.5

How do I remove the Insert from URL link in the new Wordpress 3.5 Add Media popup page? In earlier versions of Wordpress, this worked fine: // removes URL tab in image upload for post function ...
6
votes
5answers
2k views

Wordpress 3.5 Media Manager - add a button

In my plugin, I would like to add two buttons to Media Manager (to the left of "Insert Into Post" in "media-toolbar-primary" section), and connect a jQuery action to it. First one - The "Select All" ...
6
votes
1answer
18k views

How to use media upload on theme option page?

I want implement upload logo to my theme option page. Currently I follow this code What I have done for now load a related jquery for the media upload function load_only() { add_thickbox(); ...
6
votes
1answer
629 views

Disable Media Uploads to non Admin Users

I am working on a clients site, one of the features they want is for his Editors or Authors to only be able to select existing images to insert into Posts from the Media Library. So looking at the ...
6
votes
2answers
2k views

Wordpress 3.5 attachment_fields_to_edit and media_send_to_editor

In previous version i set a new check field into the media window with a simple code function ab_prettyphoto_attachment_fields_to_edit( $form_fields, $post ) { $my_form_fields = array( ...
6
votes
2answers
1k views

Media upload finished hook

I'm developing a plugin which uses wordpress's thickbox media library to handle media upload and selection. All is well but for the fact that I would like to automatically 'redirect' to the 'media ...
5
votes
2answers
2k views

How to restrict images in v3.5 Media Library modal to only those from a specific post id?

How can someone restrict the images which appear in the v3.5 Media Library modal to only show those that are attached to a specific post id? I'm creating a front-end management template that allows ...
5
votes
2answers
510 views

Delete Associated Media Upon Page Deletion

Note Use at your own risk, it is buggy and I have run across a couple instances where it would delete ALL attachments. Unsure why. Is it possible to delete media associated with a page when that ...
5
votes
3answers
627 views

Separate Media Library for each user

I'm creating a theme for a client and one of their requests is to allow users to upload images for their own use, but there may be an option to share the images. Here are some of the caveats: Each ...
5
votes
4answers
2k views

How to hide media uploads by other users in the Media menu?

Simply put - how might I completely hide media files uploaded by any other users other then themselves? Id like to disable access to these links & files since they are a way for non-admin users to ...
5
votes
1answer
1k views

WP 3.5 media manager - how to create a working gallery frame

i am writing a plugin and after hours and hours of searching for any documentation on WP 3.5 media manager i managed to create my custom media frame that is being called when a user clicks on a custom ...
5
votes
1answer
288 views

Which filters or actions to use after a media upload and delete?

When a media (image) is uploaded and the subsequent images are created (all the different sizes), I would like to perform a few actions. It is simple and I basically need only the new attachment ID, ...
5
votes
2answers
893 views

Wordpress Media Manager 3.5 - default link to

Media Manager once again. This time I'm looking for a simple hack/hook/filter to change default "Attachment Display Settings" from media manager. The option is "Link To" that is default set to "Media ...
5
votes
3answers
2k views

sortable custom column in media library

trying to make a custom column sortable in the media library. Found lots of examples for posts, and users but can't get them to work on the media library page. function wpse_hook_isv_columns() { ...
5
votes
1answer
323 views

Limit Media Library to Given Folder

I have made a plugin that uses the Media Library to allow users to upload files to a specific directory - using the upload_dir filter. I would like to know if there is a way (i.e. a filter) I can use ...
5
votes
2answers
3k views

Using the WordPress Media Library and returning the Attachment ID rather than URL?

I'm currently using some JS to pop open the WordPress Media Library in a thickbox container and return the URL of a selected image, then display it. window.send_to_editor = function(html) { ...
5
votes
1answer
167 views

print_media_templates not applied in media manager plugin

I'm trying to build a media library where users can choose pictures that are being retrieved from custom folders, which they can specify the basefolder of. I am getting the correct images back, but ...
5
votes
1answer
527 views

Change behavior of “Insert into Post” based on attachment metadata

For a custom plugin I'm working on, I have added a checkbox element to the attachments editor in a manner like the answer provided here: How to add a checkbox element to attachments editor with ...
5
votes
1answer
449 views

Edit image / Delete image link

There is a function in Wordpress that allows to display a "edit post" link if the user has sufficient rights. <?php edit_post_link( __( 'Edit' ), '<small class="edit-link">', ...
5
votes
5answers
4k views

Upload images to remote server

I am using Wordpress media uploader to upload images and I was wondering if there is a way to make it upload to my remote server instead of my local server? Example: My wordpress blog is hosted on ...
4
votes
2answers
6k views

Why is wp_get_attachment_image_src not working with my custom size (add_image_size)

I have added an image size with add_image_size('gallery-thumb', 48, 48); Why when I do array_slice(wp_get_attachment_image_src($firstimg->ID, 'gallery-thumb')) I get the link to the full ...
4
votes
1answer
2k views

How to call WP3.5 Media Library manager?

In the past Media Library window could be called like this: tb_show("Upload image", "media-upload.php?type=image&TB_iframe=1&width=640&height=520"); This still works in WP3.5. But I'm ...
4
votes
2answers
110 views

Get all posts (of any post type) an attachment is used in

It's not easy to count the amount of posts an image is attached to - WordPress simply doesn't keep track of that. It just keeps track of the post an attachment was originally uploaded to (not ...
4
votes
1answer
2k views

Changing the media library default tab

› Moderator Notice ‹ This question exists as it fills a specific criterion and/or has historical significance. The current answers do not work for current WordPress versions. If you got a ...
4
votes
3answers
1k views

Attach Files Metabox

Does anyone happen to know how to create a simple "attach/browse" button that can be placed into a metabox which upon clicking it would open a lightbox where the user would be able to view all the ...
4
votes
1answer
65 views

Why are double-periods (“..”) invalid in a Wordpress image filename?

ms-files.php contains the following code fragment: $file = rtrim( BLOGUPLOADDIR, '/' ) . '/' . str_replace( '..', '', $_GET[ 'file' ] ); if ( !is_file( $file ) ) { status_header( 404 ); die( ...
4
votes
1answer
483 views

What is the action hook for save media-form on gallery tab?

I want to save a meta data to post parent when the media-form on gallery tab is saved( The submission button is "Save All Changes"). Which action hook can I use?
4
votes
1answer
71 views

What to do with unattached logos and header uploaded via native wordpress uploader?

Normally when we sort unattached images, they include logos and header images too. My question is simple. Is there any method to keep header and logos safe from deletion? Is it possible to attach ...
4
votes
1answer
318 views

How to protect uploads in multisite if user is not logged in?

I am trying to set up a multisite intranet (using subdomains) where content on each sub-site is only accessible to users logged into their respective site. The problem I am having is trying to ...
4
votes
2answers
261 views

Add more rows on media picker

I'm trying to add more rows in the media picker modal window. Is there any clean way to achieve doing this ? Thanks !
4
votes
2answers
96 views

Unattaching unlinked images

As I understand default WP behavior: When you upload an image to a post and save it (as a draft or published post), the image becomes "attached" to the post. This can be double checked by going to ...
4
votes
1answer
82 views

complex restriction of items in media library

I have a need to limit items in the media library for users without a specific capability. There are a lot of examples out there for how to limit them to only items that a given user has uploaded, ...
4
votes
1answer
300 views

Way to force media uploader use custom image size

I've implemented media uploader to my custom category image plugin and was wondering can I somehow force it use my custom image size I've set only for categories. ... So in screen shot above, I'd ...
4
votes
1answer
483 views

How to extend LINK TO functionality in ATTACHMENT DISPLAY SETTINGS

In WP 3.4.x and earlier, it was possible to add a button to the media manager by messing around in an attachment_fields_to_edit filter. For example, a plugin could, when it figured out that an item ...
4
votes
1answer
483 views

A better Media LIbrary Experience

I've spent a good amount of time reading through everyone's suggestions about better file management with the Media Library -- and at the end of the day, I haven't come across any clear winners at the ...
4
votes
1answer
165 views

Adding more options to the instance of an image. (Attachment Display Settings)

I'm trying to build a simple reusable plugin for image presentation in Wordpress 3.9, and it seems I've hit a brick wall. I would like to be able to add a couple of options to the instance of the ...
4
votes
0answers
1k views

Best plugin to manage media library? [closed]

I'm finding the media section of WordPress a bit hard to manage with it's paginated pages. Is there any plugin that helps display all the files differently? Like more images on one page and perhaps ...