An image, audio or a video comprises a media.

learn more… | top users | synonyms

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 ...
22
votes
9answers
9k views

Restricting Users to View Only Media Library Items They Have Uploaded?

I want users to be able to upload photos using add_cap('upload_files') but in their profile page, the Media Library shows every image that's been uploaded. How can I filter that so that they can only ...
7
votes
2answers
5k views

Display Media Uploader in Own Plugin on Wordpress 3.5

I have little problem with Media Uploader in new WordPress 3.5. I created own plugin which is upload the picture. I'm using this code JS: <script type="text/javascript"> var file_frame; ...
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 ...
5
votes
3answers
3k views

How to use taxonomies on attachments with the new Media Library?

WordPress 3.5 changed the media management and now the Media Library edit screen uses the default post type UI. Taxonomies are very useful for WP installs with different users and attachments, giving ...
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" ...
2
votes
4answers
19k views

How to Fix HTTP Error When Uploading Images?

I am using WordPress 3.4.1 on Ubuntu 12.04 using Apache and PHP 5.3.X When I login to the dashboard and add a new post. Then try uploading an image to set as a featured image, I get a red box with a ...
7
votes
1answer
2k views

WordPress 3.5: Switch back to Old Media Uploader?

Is there any way to switch back to the old media uploader in WordPress 3.5? The new one is very slow for me, as I have thousands and thousands of images across my site, and I have a few plugins that ...
7
votes
2answers
9k 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 ...
5
votes
2answers
867 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 ...
3
votes
3answers
4k views

Resizing all images

I have just changed the theme on my blog, and because of a small page width, it breaks the layout. Most of my earlier images (attached in posts) are around 600px in width, and now I need to resize all ...
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 ...
10
votes
4answers
4k views

Cleanup uploads folder, Media Library db structure

I am doing an upgrade and cleanup of an old blog that started on Blogger.com, then moved to self-hosted WordPress 2.1, 2.3 and now 3.0. Images in the posts are scattered around: most of them are in ...
2
votes
1answer
6k views

Restricting access to files within a specific folder [duplicate]

Possible Duplicate: How to Protect Uploads, if User is not Logged In? Is there any way at all to restrict direct access to files within a specific folder to only specific wordpress users ...
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 ...
2
votes
2answers
4k views

Wordpress Image Editor not working - conflict?

I am having a strange issue with the built in wordpress image editor. I have no problem uploading files or preforming any other media functions. The only thing I seem to be unable to do is utilize the ...
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 ...
1
vote
1answer
1k views

Custom bulk action for media gallery items

I'm trying to add custom "Bulk Actions" to WP 3.5 new media gallery items. I started from this excellent tutorial which does exactly what I need, but with regular posts; so i tried to adapt it to work ...
3
votes
2answers
908 views

How to make custom bulk actions work on the media/upload page?

I'm adapting a script I found online to add custom bulk actions to the screen with the list of posts. It has this line: add_action('load-edit.php', 'custom_bulk_action'); I'm trying to adapt it for ...
2
votes
2answers
299 views

Differentiate Featured Image from Post Images upon Upload

I want to differentiate the featured image from post images. The plan is to give the Featured Image multiple sizes, but the images inside / connected to the post only needs the default sizes. I ...
6
votes
1answer
453 views

what happens to existing media files when I switch to year/month directory structure format?

A site has thousands of images in the uploads folder. ISP has threatened to shut it down because it is about to exceed server limits for the max number of files in one directory. I looked at the ...
2
votes
2answers
266 views

Set a maximum upload count for users on a specific user role

For users with the Contributor user role, I want to restrict the total amount of images that they are allowed to upload. I found this code posted on an answer here: add_filter( 'wp_handle_upload', ...
1
vote
1answer
526 views

How to Removing fields from the Media Uploader/Gallery on a Custom Post Type Edit Page

This post shows how to remove unwanted fields from the media uploader. It works great, but I want to limit it to a custom-post-type and I can't seem to figure out how to do it. I've tried the ...
1
vote
1answer
960 views

Media > Image Sizes aren't being applied to uploads

Under Media Settings I edited the Image Sizes to the following: Thumbnail size: 170x80 Medium size: 550x170 Large size: 550x320 ("Crop thumbnails to exact dimensions" is checked) Maximum embed size: ...
-1
votes
1answer
142 views

How can I attach files without using a plugin?

I want to add files from my site or from external links with files to any of my posts, and be able to add the size of the file and choose which ones it will do "File Force" and which not. I want to ...
9
votes
1answer
5k views

Adding Category/Tag/Taxonomy Support to Images/Media

I've been trying to add category, tag, or custom taxonomy support to images (or all media, though I'm only concerned with Images). I've got it part-way figured out with: add_action('init', ...
10
votes
2answers
1k views

ZIP up all images displayed in a [gallery] and offer as download link

I would like to offer my visitors the option to download the entire photo gallery (displayed on dedicated [gallery] pages) as a ZIP file displayed at the bottom of each gallery page. - The full-sized ...
5
votes
2answers
936 views

Any plugin out there that uses WP's internal image uploader?

I'm trying to use the media uploader thing from WP (the form from the pop-up with crunching and all that), and can't figure out how. Is there any plugin out there that uses it? It would be easier to ...
5
votes
5answers
9k views

How to increase the file size limit for media uploads?

How can I change the Maximum upload file size? I would like to be able to upload 10Mb at a time.
4
votes
1answer
373 views

Decrease file size upload in Media

By default, I have a 2m limit of uploads. I want to decrease this number. I found out that this code: function custom_file_max_upload_size( $file ) { $size = $file['size']; if ( $size > ...
1
vote
2answers
734 views

Using Default WordPress Custom Header Image Crop Feature in a Post Type / MetaBox

I am not sure how many of you have experimented with the new custom header image functionality of wordpress 3.0 but its actually very cool (enabled by adding the function to your functions.php file). ...
17
votes
1answer
4k views

How to manage attachment relationships for specific posts in WP 3.5+

In WordPress 3.5, media management has changed entirely. Also, relating attachments to specific posts is (I believe) basically only being done for backward compatibility. Therefore, after uploading ...
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 ...
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 ...
3
votes
2answers
2k views

Media library to list images only user uploaded

I want to list images for only user uploaded image. Here is the scenario: Using the image uploader on front end using iframe. I have added upload_files cap to subscriber level users and want them ...
2
votes
1answer
1k views

Custom function to rearrange attachments when creating posts – Almost there

I'm having some trouble with a custom thing I'm doing. I've implented a custom image uploader into a metabox in a custom post type. Now I'm trying to work out a way that will let me reorder the ...
6
votes
3answers
870 views

Replace audio/video enclosure with player?

Current state: I'm parsing XML feeds into the front end and/or the back end (Admin UI), but not into the DB. Inside those feeds i place mp3- and video content, currently only as plain text (no link, ...
5
votes
2answers
1k views

Expanding new Media Uploader in WordPress 3.5

In current version of WordPress it is quite easy to expand the attachments fields using attachment_fields_to_edit filter, but in latest WordPress 3.5 RC2 it's not working. We can expand it using ...
3
votes
3answers
2k views

Saving Media - Which Hook is Fired?

Howdi, I am trying to fire some code that will occur when I save an image in the media library, as per usual, I select the file, upload, enter the meta data and then click save. At this point I want ...
3
votes
3answers
4k views

Linking a PDF as a downloadable document

How do I add a link to a PDF in the content, so that it downloads rather than opens in the browser windows? (I've uploaded the PDF to the media library and can insert the link but can't find an ...
1
vote
1answer
322 views

Add custom image sizes to media uploader

I want to add custom image sizes to the media uploader: In order to do this, I use the following code (comments are there for convenience): // this function adds the custom image sizes to the ...
0
votes
1answer
207 views

How to prepare images for a layout width change?

I maintain a site that will get a new layout, with a new width for the content area (currently 390px, say 500px for the new width). Many images (but not all) are sized to the current width (some are ...
4
votes
2answers
504 views

Removing default image size list in Media Box

I trying to remove unused image size (Thumbnail, Medium, Large) in MediaBox Any function can i use in functions.php ? or some trick ? PS : I know i can use jQuery trick but any better function to ...
2
votes
1answer
2k views

custom tabs in media uploader

I've managed to add a custom tab to the media uploader, but for some reason it doesn't come with the same layout - it doesn't load the media-uploader-header that contain all the other tabs: ...
2
votes
1answer
197 views

Displaying oEmbed errors?

Sometimes embedding an item via oEmbed is not possible, for example when a YouTube video has embedding disabled. The oEmbed service will return a 401 Unauthorized, and the code will not be converted. ...
1
vote
1answer
536 views

3.5 media manager add CSS / JS to new 'tab' iframe content

Whilst (patiently) waiting for proper documentation and/or a few tutorials on the new media uploader I'm still using the media_upload_tabsfilter to add a tab to the uploader. Here's my (working) code: ...
1
vote
1answer
758 views

Retrieving and Storing Images Linked from Other Domains on Local Server?

(Moderator's note: The original title was "Copy and Paste picture in post without linking to original") When I copy and paste a picture from another editor window it appears nicely but it links to ...
3
votes
1answer
278 views

Filter by post category in Media Library

I am trying to find a way to filter the Media Library by the Post Category that a Media item is assigned with. I can see that you can sort by "attached to" but this only get me a little of the way ...
3
votes
1answer
1k views

Uploading Images to Multi-Site Causes Failure to HTTP Error

Just to fill you in on my situation. Running WordPress multi-site version: 3.5.2 clean install. Zero 3rd party plugins. All of my plugins have been disabled for debugging. Using WordPress MU ...
2
votes
2answers
324 views

Is it possible to trigger some JavaScript when Media Popup is opened?

On one of my custom posts edit page I have a button that triggers the media popup onclick, with: wp.media.editor.open(); and while it brings up the media manager I'm not sure if that's the proper way ...