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

1
vote
1answer
78 views

How to link to “most recent” document in the Media Library?

Our customer wants a "Latest Newsletter" type link on the homepage. I figured there'd be an easy way to specify a document from the media library (perhaps by name or title) but nothing is coming up ...
0
votes
0answers
86 views

Sortable Attachments Using 3.5 Media Uploader with Custom View

I'm using the tutorial by Mike Jolley to integrate the media uploader introduced in 3.5 into a custom post type edit page. The pertinent HTML on the page is this: <div ...
1
vote
1answer
111 views

Media Manager (since 3.5): How to show an empty Media Library when creating a media frame?

Is there a way to make sure the "Media Library" tab does not show any images until I start uploading some in the "Upload Files" tab? I am creating a wp.media frame with the following code: var ...
0
votes
1answer
623 views

Wordpress function: limit size, only jpg, jpeg, limit of uploaded files per account

Need help with a function that will limit upload for non admins: Check before upload if file is jpg, jpeg. Check before upload if picture is not bigger than 700kb. Limit uploaded files to 7 per ...
1
vote
1answer
37 views

How to create media library for each user?

In my project there are three types of users, teacher, student, and admin. Each user has the provision to add posts. But my problem is that each user need each media library for add images into post. ...
0
votes
0answers
47 views

Add media browser tab for CPT

I created a CPT "Gallery" and wanted to create a new tab in the media browser. For now I added a tab and created a function for it's content: jw_gallery_media_tabs($tabs) { return ...
1
vote
0answers
186 views

Javascript WP Object Documentation?

I was working on implementing the media library within one of my plugins/themes. I found a nice tutorial (http://mikejolley.com/2012/12/using-the-new-wordpress-3-5-media-uploader-in-plugins/) that ...
0
votes
2answers
69 views

Multiple thumbnails and one gallery

I'm looking for solution for a gallery on a WP page that shows multiple thumbnails of images in that gallery, but not all thumbnails in gallery (like default Galleries in WP works). I want ...
0
votes
1answer
273 views

Metabox with file upload to custom directory

I've found lots of tutorials on how to create a metabox file uploader using wordpress' native file uploader. However, I would like to have the uploaded file placed in to a custom directory, and I'm ...
0
votes
1answer
166 views

How to Filter in the “Add Media Popup” to show only “unattached” Media

Any idea how to hack WP 3.8.x for this feature?
0
votes
2answers
113 views

Handle lots of images within the media uploader / selector

I currently have a website containing more than 3K images (and counting...) within the media library. When the user opens the Media Uploader to select or upload an image to a post the media selector ...
4
votes
1answer
79 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( ...
0
votes
1answer
28 views

How do I embed an image at actual size?

I'd like to give the user the option to insert images into posts, and have the image display at its actual size. How do I do this? Currently, if an image is selected from the media library, a ...
1
vote
1answer
372 views

Hide Default Video Shortcode Controls on PageLoad

In wordpress 3.6+ when we use default video shortcode [video], controls of video are always visible on pageload. How can we hide these controls on page load and show only when we hover over the video ...
0
votes
1answer
273 views

Add item to media library from blob or dataUrl

I'm trying to build a webcam snapshot recorder. It should take a picture and upload it to the WP media library via ajax / async-upload. Already managed to add a view to the media library. Recording ...
0
votes
0answers
40 views

Network shared post error You do not have permission to upload files to site + 500 internal server error

I am using Network Shared Post plugin in my wordpress 3.6 website to use users images themselves. But when a user try to use other people files, it shows an error message "You do not have ...
0
votes
0answers
27 views

Embed from wordpress to another site (object within post)

So I'm using the built in wordpress player for my podcast within a blog I syndicate through tumblr. I was hoping to have the player display on other sites. Is there a way to embed the player (maybe ...
0
votes
0answers
59 views

Attachment Metadata not updated while uploading audio files

Suddenly, I am having some issues when uploading audio type of file in wordpress. previously, when I uploaded .mp3 files, the attachment metadata of the files were updated accordingly, for instance; ...
0
votes
0answers
46 views

Media Library filter returns undefined function get_current_screen

Hello I am following Filter by post category in Media Library I copied the code answer into my functions.php file at the bottom and got this error: Fatal error: Call to undefined function ...
1
vote
0answers
59 views

Add custom text in the media library image meta area

I want to add some custom text in this area in the media library: Is there a filter I could hook into or how can I add content there? If not, how do we do this using Javascript? I want the text to ...
1
vote
1answer
93 views

delete a photo tag in rtmedia [closed]

I am using rtmedia photo tag in my website. When deleting a user I am also trying to delete all the photo tags added by him on the albums of other users. How can I do that?. Is there any functions ...
4
votes
1answer
356 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 ...
0
votes
1answer
2k views

3.8 Media Upload and Custom Meta Box

I've been using Tammy Hart's Reusable Custom MetaBox code for some time now but with the recent 3.8 update the media upload seems to be no longer functioning, and the code is no longer supported. ...
0
votes
1answer
148 views

Images are not showing up in “Uploaded to this post”

I had to delete all my files of web site for some reasons. Then I've restored the files back to host. But the problem is that; Firstly, I uploaded all the images (about 4000) to upload folder via ...
0
votes
0answers
21 views

Is there a way to add Reattach and Unattach links in image gallery?

For some reason the Reattach and Unattach links in Media library is gone. Is there a way to add these from functions.php?
0
votes
0answers
29 views

How to have one post with two seperate media libraries which upload to and load from their repective directories?

I am developing a project management program for my engineering company. Clients and jobs are custom post types. I have a custom uploader that I have created using wordpress's native uploader to ...
0
votes
2answers
818 views

Disable media library tab for non admins in uploader screen

I am developing a plugin in which i am required to allow front end users to upload media, which I am able to do. But I don't want to let them sneak into media library which comes as tab with uploader ...
3
votes
2answers
108 views

Register an additional image size for only some images in my media library

There is a type of post on my blog which requires one extremely large image (such that it can be zoomed). I don't want to register a new image size, because I only need a certain small subset of ...
0
votes
1answer
400 views

Wordpress media manager multiple selection output

I'm trying to use media manager in metabox, and I need to use multiple select. I just have problem with doing output from that selection. I need element in metabox to hold all selected files urls. My ...
1
vote
0answers
168 views

Display only my own files/images in media library

I just want to let user see only their own files in media library. I have 2 questions: it works great on list of media library. add_action('pre_get_posts','users_own_attachments'); function ...
0
votes
0answers
24 views

how to setup user access media library?

I think this could be a simple answer but I can't really find. except administrator, users are not able to see "media library". Is there anyway to setup to show (display on dashboard) media library ...
2
votes
2answers
423 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 ...
2
votes
1answer
229 views

Adding Alt Attributes Automatically when Uploading Images to Media Library

I have lots of images that has to be uploaded via media library. I want to know, is it possible to add file name to alt attribute field automatically when I am uploading them? At the moment I have to ...
0
votes
1answer
54 views

How can I add a Description column to the media library browser screen?

I'm trying to display the description of each file on the media library browser screen. I've found some code that adds a filename column, but I'm trying to modify it so that it will display the ...
0
votes
1answer
25 views

Get filenames of available image sizes

Example: /wp-content/uploads/2013/11/xyz.jpg This has 2 other thumbnail images that were created with it.. /wp-content/uploads/2013/11/xyz-150x150.jpg /wp-content/uploads/2013/11/xyz-201x300.jpg ...
1
vote
2answers
559 views

Remove the 'Attachment Details' section of the wordpress media manager

I'm using the new WP media manager for a branding plugin (well, new from 3.5), and it is working well. My only issue is that I have an 'Attachment Details' area on the right, allowing users to edit, ...
0
votes
0answers
42 views

Image media upload problem in page editing modus?

I can't figure this out, uploading an image when i am editing or adding a page doesn't work correctly. During upload i get a http error. Debugging shows async-upload.php gives a 500. The funny thing ...
2
votes
1answer
68 views

Is it possible to personalize the Media Library?

When we create a new post and click on Featured Image, I realize that WP creates a folder structure "year/month/image.jpg". I'd like to change that behavior to "category_of_the_post/image.jpg" (or ...
0
votes
0answers
131 views

Creating custom Insert Media page

I'm writing a plugin, that has the basically the same functionality as Insert Media page in "Add media" popup. The only difference mine has to use web service for browsing media. I already read about ...
0
votes
0answers
61 views

Multiple Permalinks per Media Library Image

I'm importing a CSV file for Woocommerce Products, a number of products link to the same (already uploaded) image file. They link fine, however in the Media Library I now have multiple versions of the ...
0
votes
1answer
1k views

Add SWF file to wordpress through custom template

I am trying to attach an swf file to my website. I have that swf file in my local system. But wordpress is not alowing me to upload the swf file into the media library. I want to add that swf to my ...
4
votes
1answer
88 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, ...
0
votes
2answers
64 views

How can I create more “create attachment” custom field - any idea?

define('MY_POST_TYPE', 'myslider'); define('MY_POST_SLUG', 'myslider'); function my_register_post_type () { $args = array ( 'label' => 'Gallery', 'supports' => array( ...
0
votes
1answer
198 views

Use wp_remote_get to add image to media library

I'm using Embedly to make it easy for a client to add news to their website - basically, they just input a URL, and Embedly grabs the link's information, and I add it all to post meta for displaying ...
1
vote
1answer
176 views

Wordpress Media Library showing wrong preview size?

When uploading new (or existing) images to the media library in Wordpress 3.6.1 the preview generated on the admin page/edit media page (eg. wp-admin/post.php?post=8736&action=edit ) is showing ...
0
votes
1answer
151 views

attachment media-template data model (data.size.url)

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'd like to keep using as much WP ...
0
votes
1answer
103 views

Media uploader & manager: add/remove class on image with checkbox

This seems like it should be fairly simple, but I'm drawing a blank on it: Have a checkbox in the media uploader and media manager that, when checked, adds a CSS class name to the image. It should ...
5
votes
1answer
217 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 ...
0
votes
1answer
166 views

Add select field to media uploader that adds a class to the image

I'm looking for a way to add a <select> menu to the media uploader that will have two options: normal image, which will do nothing, and profile image, which will add a CSS class to the image if ...
0
votes
1answer
34 views

Media library orphans

I have this conditional statement that checks if an image has been added to a custom post type and if it hasn't it inserts a default image. if ( get_post_meta( get_the_ID(), ...