An image, audio or a video comprises a media.

learn more… | top users | synonyms

2
votes
1answer
224 views

How to validate the file name of the Media File Uploads?

I want to validate the file name of the files to be uploaded from the Media Library. CASE study: I want to restrict the file name containing '%', '. .', '/' etc..from uploading to the media library. ...
2
votes
1answer
2k views

Failed to import media from a local wordpress site to a live one

I've been developing a new blog theme for a client locally on my computer and am now in the process of uploading this to the new live server. I used the wordpress export facility to export all the ...
2
votes
2answers
795 views

Fixing media links after importing to multisite

When i imported all posts and media from a old site to new site which on wordpress multisite. The image links on posts are got broken because how media are stored on a multisite is quite different ...
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 ...
2
votes
1answer
760 views

I need a Simple image uploader with a simple screen. WP default has too many options.

Hi guys I'm looking for a metabox type plugin that can upload ONE image into the post, that works with custom post types. I don't want to use the default WP uploader because it has too many options, ...
2
votes
1answer
324 views

Setting higher upload limit

How can I change the standard 7MB upload limit? I have full shell and admin access to my Wordpress blog.
2
votes
2answers
450 views

Should I use custom post types for a front page video feature (vimeo)?

I'd like to create a front page video feature that embeds a vimeo video of the users choosing. I'd like the user to only have to input the video code. For instance, for http://vimeo.com/24474320 - ...
2
votes
2answers
100 views

Disable edit option in Media library

Hovering my mouse over a file name or a thumbnail brings up the Edit option, I want to know is there any hook to disable all edit links in Media library on Multisite
2
votes
1answer
370 views

Delete attachments from Front end

I am trying to make a simple media manager on the front end of my posts, as my site will have many authors. I want to give them the ability to delete any picture attachments that they have uploaded to ...
2
votes
2answers
1k views

Organize uploaded media files

I have a blog with all media stored in a folder called upload (organize media was disabled), I've activate it to organize new uploads by date. But how can i organize old files? I want this because i ...
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 ...
2
votes
1answer
2k views

Wordpress 3.0 Media Upload Directory

I am using Wordpress 3.0 and would like to organize the directory where uploads are made. Is there any way to change where the files get uploaded or is the only real organization the Media tag plugin? ...
2
votes
1answer
2k views

Uploading Media gives error “Missing a temporary folder.”

After we upgraded to Wordpress 3.0.1 (from Wordpress MU 2.9.2) we began getting an error message whenever we tried to upload media. "Missing a temporary folder" Various articles around the web ...
2
votes
1answer
269 views

Filter for changing MediaElement.js Settings

I am trying to change some of the settings that get loaded with MediaElement.js. I can't seem to find a filter or hook to alter the settings that are loaded. The only way I was able to customize the ...
2
votes
2answers
265 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', ...
2
votes
1answer
335 views

Media handle sideload not working

I am using this media uploader wp snippet which downloads an image from my one site to other. It was working fine until yesterday but I checked this morning, it wasn't working. ...
2
votes
1answer
84 views

3.5 media.editor: what is the event listener for choosing an image?

What is the event listener for selecting an image in the media.editor javascript. I am attempting to add a multiple image selector to a custom plugin, and I need to show the user what images they have ...
2
votes
1answer
609 views

Get attachments (get_posts) and WP 3.5 new uploader

I'm using get_posts() to get attachments from the post and use it in the slider. The issue is new uploader doesn't have that "Gallery" tab which was perfectly suitable for this. It also seems to be ...
2
votes
1answer
95 views

What table is the media's sort order stored?

I see that your can sort media by a numbered order in the media gallery for a post. But what table is this order stored in? I want to use this order to also order the images the same way in my ...
2
votes
1answer
325 views

Best way to strip character entities (%20 etc)

I have a heap of images inside MovableType, on an old server. There are plenty which have character entities like %20 to represent spaces. I've used some plugins to import the images and change the ...
2
votes
2answers
793 views

Plugin to download attached media files?

I have a photo gallery site. Each post has 10-20 photos. I want to be able to offer a download of my photos on post-by-post basis in a single zip file. In other words a link to a zip file with all ...
2
votes
2answers
835 views

What's the best “insert all images” plugin?

I've tried several plugins that supposedly allow you to "insert all images" after using the flash based uploader to upload multiple images. However, I still haven't found one that ties in well with ...
2
votes
1answer
830 views

Too much recursion error when chosing image from image library for two different meta boxes in one post

There must be a solution for this. I am using this solution for chooosing images from media library. http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/ ...
2
votes
1answer
178 views

Is email post notify visitor on new media upload possible?

Is there a plugin or snippet that would: Add an email input form to each post Send a predefined message when new media (or attachments) has been uploaded for that post only The requested ...
2
votes
1answer
1k 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. ...
2
votes
1answer
30 views

Filter Media Library by author or post_parent

I am trying to filter the Media Library so only media items that are uploaded by the current user OR children of the post being edited are visible. I've had no problem doing it if the conditions are ...
2
votes
0answers
23 views

Category checkboxes in upload modal

In a project I'm working on, I've enabled categories for attachments using: register_taxonomy_for_object_type('category', 'attachment'); In the edit attachment screen in the Media Library you see ...
2
votes
0answers
132 views

Upload path/URL weirdness for the main blog of a multisite/network setup

We have a WP network (with domain mapping) that was started pre WP 3.5, so it was using ms-files.php and wp-content/blogs.dir/ to store media files. I wanted to remove ms-files.php dependency and ...
2
votes
0answers
93 views

Extend Media Library

The Media Library in WordPress has "Insert from URL" link to the left. It accepts image URLs. It's not said anywhere but if you paste YouTube URL or <iframe> code then it will insert it too. It ...
2
votes
0answers
55 views

Proper way to add a button to the top menu of the media library?

I want to add a simple button to the Media Library top menu (say, to the right of the bulk actions / filters dropdowns. I have scoured the WordPress codex for a proper way to do this and have found ...
2
votes
0answers
172 views

Change default tab of media manager

Is there a way to change the default media manager tab? I have managed to remove everything that I didn't want to show in media manager, using the instructions from the first post here Add a menu item ...
2
votes
1answer
111 views

How to change the naming of the resized image files

Now with custom image sizes Wordpress is almost as powerful as timThumb / phpThumb. There is one problem however. The way Wordpress handles the resized images are chaotic and doesn't survive theme ...
2
votes
1answer
222 views

WP3.5 Media Uploader - how to make it accept multiple images?

I'm wondering how to make WP3.5 media uploader return 2 or more items in attachement? It always runs once even if 2 items are selected. The code: $('.button').on('click', function(){ var ...
2
votes
3answers
313 views

How to insert an Audio Player in a Post or Page?

I have a blog which I sometimes use for audio clips. I want to put an Audio Player on the frontpage of my blog. How can I put the player after the title or make its code part of post excerpts?
2
votes
1answer
432 views

Change default from “Attachment post URL” to “File URL” in Add Media

When a user upload images, by default, the Attachment Post URL option is selected. How can I change the default to be "File URL"? If that is not possible, how can I remove the attachment post url ...
2
votes
1answer
1k views

Set Image width='x%' (percentage width not pixel width) when inserted via the media manager?

When uploading images via the media manager there are a couple of set sizes available such as thumb, medium and large. I do know how to add additional sizes, but I have yet to get it to insert an ...
1
vote
1answer
136 views

Rename “Add Media” Button To “Add Images”

I would like to rename the "Add Media" button (just above the post editor interface) to be "Add Images". I can't seem to find the appropriate filter for this. There seems to be a filter that has now ...
1
vote
2answers
1k views

How to limit characters of the post title?

How do I limit the number of characters in a post title? I've seen it done in Yoast's Wordpress SEO plugin but I want to do something similar for the WP title. I checked out a plugin called Limit a ...
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
vote
1answer
550 views

3.5 Media Manager - callout in metaboxes

Two ways of doing the same thing: First one: var _custom_media = true, _orig_send_attachment = wp.media.editor.send.attachment; $('.media-upload-button').click(function(e) { var ...
1
vote
1answer
2k views

How to add a media with PHP

I have more than 1000 pictures on my webserver, uploaded with FTP in a local folder ( /home/chris/pictures ) Is there a way to add them as a well known media to wordpress in PHP and get their id? ...
1
vote
1answer
808 views

display image size in media library screen

i'm trying to add image size in media library screen so will be simply to handle images. Anyone does it before me? Any help appreciated. Francesco
1
vote
2answers
2k views

Force wordpress to see uploads folder media

I uploaded the "uploads" folder to my wordpress install manually from a backup with the exact domain. All of the media properties for height and with are the same and they are all visible on the site. ...
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). ...
1
vote
2answers
2k views

How to single click to download image in single post

i have attacment.php like this. <?php if ( $attachments = get_children( array( 'post_type' => 'attachment', 'post_mime_type'=>'image', 'numberposts' => 1, 'post_status' => ...
1
vote
2answers
196 views

How do I get allowed Media Library upload file extension list?

WordPress has list of allowed Media Library upload extensions in wp-includes/functions.php but is there any way to return them to theme's files as an array?
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
252 views

Float images in content

This is not a programming question. I have the problem to update the content in my WordPress blog. I'm very aware this problem can be solved by html modification. But my client doesn't know about ...
1
vote
1answer
713 views

How to retrieve alt attribute for an attachment (uploaded image)?

I have some IDs of attachments (images, not from current post). How to I get the alt attribute for those images? I have tried to look into wp_get_attachment_image_src and wp_get_attachment_metadata ...