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

0
votes
0answers
14 views

How to make “File URL” in Media Library editable? [on hold]

I intend to outsource all the media bandwidth. Most plugins use images directly from media library though.
0
votes
0answers
9 views

How can I trigger the media library “query-attachments” action manually?

I'm working on a plugin that manipulates the WordPress 4.0+ Media Library. I see that the attachments in the media library are loaded by an ajax call using the query-attachments action. I need to ...
1
vote
0answers
15 views

Add media library tab

I'm trying to make a new tab in the media library. I have found the function add_media_page which helps me add a page in the media menu to the left. How ever, this menu is not always visible, for ...
0
votes
0answers
22 views

How to get attachment id as soon as it is uploaded through media uploader in jquery?

Using jquery, I am trying to get image attachment id of all images requested to upload through media uploader on post edit page or upload.php. Here is what I tried but this works after all images are ...
0
votes
0answers
16 views

Images dont show in grid view, but do in list view

In media library, images show in list view, but not in grid view. This becomes an issue because adding a featured image is done by grid view only. I had to edit the DB to make all jpg files lower ...
0
votes
0answers
12 views

Restrict Media Library to one user except for admins

I have this function to restrict the media library to one user. However I have a few admins who need access to the whole library. How can I make all of it available for admins only ? /*restirct ...
0
votes
0answers
6 views

image carousel widget

Is there tutorial how to build widget where you can upload multiple images? I was trying to look some tutorials on widgets but to my surprise there are only few online. Or then my googling skills are ...
0
votes
1answer
18 views

When I'm in post editor and click on 'Add media', why won't it load the media library with this code?

add_action( 'admin_init', 'my_remove_menu_pages' ); function my_remove_menu_pages() { global $user_ID; if ( current_user_can( 'contributor' ) ) { remove_menu_page('tools.php'); // Tools ...
2
votes
1answer
34 views

Filter media library items by size

I want to prevent users from being able to set a Featured Image from the media library if its width is less than 100px. Originally I thought to use the ajax_query_attachments_args filter, but it ...
0
votes
0answers
56 views

Custom dropdown filter in media grid view

With the new grid mode in the media library the good old WP_List_Table specific restrict_manage_posts filter for adding custom filtering options is not available. All happens through JavaScript. I ...
0
votes
0answers
46 views

Wordpress does not detect all images in uploads folder?

I have about 500,000 images in the /uploads folder, but in Wordpress admin the media library only shows 10,000 images used (which is correct) and 10,000 unattached. In reality it's more like 490,000 ...
0
votes
1answer
33 views

Add Image Size for one Media Category Only

add_image_size is great, but if I want to create a swatch size for colors/patterns on my site, I don't need the swatch size for all of my other images. Is there any way to apply image size by media ...
0
votes
0answers
12 views

Uploading thousands of images easily from an existing album/subalbum structure into same

Having looked and not finding an answer, I'm asking the wizards. I'm creating a WP site with approx 1500 posts about heritage sites, sites of which I have tens of thousands of photos. I manage the ...
8
votes
1answer
147 views

How to display .ico files in the media library

I have added a .ico mime type into my WordPress site and I'm able to upload favicon files. But the media library only displays the default.png image for these images and also in the Customizer. How ...
1
vote
0answers
24 views

How to add 'Attachment Display Settings' in custom Media Library?

By default, when clicking on insert media and selecting an image, we get 'Attachment Display Settings'. I am creating a custom Media Library for a Custom Post using the following code: ...
0
votes
1answer
34 views

Media Manager: refresh library after new selection

I have created a custom field into a metabox with a button that opens up the media manager and allows the selection of multiple images. On the "open" event, the gallery retrieves the images IDS of the ...
0
votes
0answers
30 views

How to configure WordPress to create thumbnails

I was having a problem on a 3.8.0 install where thumbnails were not being created by WordPress. I thought it was the install, so I installed 3.9.2, not upgrade, but completely different install. And ...
1
vote
0answers
24 views

Extending Media Gallery - Retrieving values from short code

There are some existing questions that discuss how to add fields to the gallery dialog box and get those into the short code. What I want to be able to do is facilitate editing an existing short ...
0
votes
1answer
20 views

Open Media Uploader Link in single post or page

I want to open the media Upload Window like in a single post or page. It is important for me, to have that menu on top, which filters the media Library: This is my current code, which allows only ...
0
votes
0answers
12 views

Media Manager not creating thumbnails

I am working with the media manager in WP 3.8. For some reason, it is not creating thumbnails. The original image uploads just fine. Here is a list of things I've done or checked: The images I am ...
0
votes
1answer
25 views

Using the media library for theme customization

I'm using Underscores to build a theme and I've added an image selector to the customization section, which appears just like the default Background Image section, except clicking 'Select Image' ...
0
votes
1answer
55 views

Upload mobi and epub file in the MEDIA of WP

How can I upload mobi and epub files in the MEDIA of my WP site? I want customers to be able to download my ebooks in the epub and mobi version also, not just in PDF !!! I know there is an HTML code ...
0
votes
1answer
49 views

How to link a PDF file to a category URL

I am not sure if it is possible to do this but I have a category called case-studies into which I write individual posts to summarize a case-study - for the sake of this question let's give a title of ...
0
votes
1answer
20 views

My deleted media exists jet

I've a problem with my wordpress theme. I deleted some media files (some img) and it's appearing in my Media section (in my wp-admin) without thumbnail, but it's like the file exist. I'm looking in ...
1
vote
0answers
49 views

Refreshing collections in the admin media manager

I know this question is very similar to this previously asked question; however, I was wondering if there was a more up-to-date/official way to refresh content programmatically in the WordPress admin ...
0
votes
0answers
28 views

Exclude some photos in media library

I was searching for filters to exclude some photos from media library. I have an array of image ID, and want them to exclude from media library any idea?
0
votes
0answers
78 views

Images On The Server But Not Showing Up in WordPress Multisite Media Gallery

I've had several different WordPress installations in the past. I've moved all of them into a single WordPress multisite install. Previously, there was one main site installed on example.org and then ...
0
votes
0answers
38 views

Force an image upload form field to display as checkboxes

I'm using a plugin called Media Library Categories which adds category taxonomy to media files, so I can give images a category denomination. It works and displays as checkboxes in the Edit Media ...
2
votes
1answer
47 views

Uploading images: 'ø' get replaced with 'ø'

So, I have 2 sites. One in production, and the another in development. They have the same content and uploads. In production, images with names containing æ, ø, or å gets the character replaced with ...
1
vote
0answers
144 views

Custom media picker in meta box: how to select available image sizes?

I have a custom meta box where a user can select an image and save it using wordpresses media picker, set up with some JavaScript. That works fine, but I'd like the option to select which version of ...
1
vote
1answer
102 views

How do I fix permalink and media library issues on a LEMP stack?

So, I'm setting up a wordpress site on Digital Ocean's IaaS. I'm using nginx as a proxy and web server (instead of apache), so a LEMP stack. I was able to get my site up and running, though there are ...
5
votes
1answer
236 views

Custom “Uploads” Dir: “Edit Image” in Media Library broken

Directory Structure I have customized my (local) install (dev box). The current directory structure is: ./root |- wp (WordPress Core root) \ |- wp-config.php |- wp-content (Content and ...
0
votes
0answers
26 views

How to prevent newline chars after inserting images

I mostly write my blog posts in the Text rather than Visual editor. I add line breaks and allow wordpress to translate them to <br> and <p> tags as appropriate. That works fine. My ...
0
votes
1answer
42 views

Distinguish between 2 instances of admin-ajax.php

I've added an avatar image selector to my profile.php page. I'd like to be able to alter the query that loads the image library using pre_get_posts but I can't find any way to distinguish between ...
0
votes
2answers
82 views

Upload Multiple Files With Multiple Fields And With media_handle_upload

I asked this question about few days ago and the answer solved my instantly problem but now when I tried to put many file fields in the form just the first field work because the solution of my ...
1
vote
2answers
491 views

Upload Multiple Files With media_handle_upload

I have a WordPress form plugin and I use media_handle_upload to upload the files and get there ids directly and attached its ids to the post as a meta date, I used the following to did that: The HTML ...
1
vote
1answer
51 views

Featured images get shrunken

While uploading featured images, the problem I am getting is, all images are shrinking automatically. I want to retain the original image. Check this example. All staff memebers images are shrinked ...
5
votes
1answer
179 views

Rendering the uploaded file in a wp.media object

I have seen this question asked a few times on SO and I don't see any responses. I have a wp.media object (upload dialog), that I am using in to store an upload to a post as a meta element. It works ...
0
votes
0answers
54 views

WordPress media uploader - upload tabs not hiding

I'm in the process of adding a front-end post editor to one of my sites. In doing so, I need to prevent certain users from being able to upload media. I have things "kind of" working but there are a ...
0
votes
0answers
24 views

How can i upload files to a dir other than media library

I am developing a custom plugin . That plugin need to have upload functionality which will not be images and should not be seen in media gallery . How can i set a custom upload directory which can ...
1
vote
0answers
21 views

Images uploaded to the media library has strange colors. However, in the edit screen the color is ok

This is a strange issue that I've never encountered before. When I upload this image to WordPress' media library, it comes out like this (image on the left): This is also how the image appears on ...
0
votes
0answers
68 views

Filter wp_get_attachment_image

I'm working on a new WordPress plugin, that will have to change the media library directly. For that I have to overwrite or filter the wp_get_attachment_image function, that class-wp-media-list-table ...
0
votes
0answers
77 views

Filter media attachments by post in Media Library

Were working on a small plugin to allow attachments in the media library to be filtered by the post that they are attached to - and the basics are working: You can see the full code hosted on github ...
0
votes
0answers
79 views

Add Media Library tab to Image upload of Theme Customizer

When creating a custom control in the Theme Customizer to add an image, how do you add a tab for the Media Library in order to select a previously uploaded image rather than having to reupload an ...
0
votes
0answers
36 views

Failed to import wordpress xml and media

I am trying to import a wordpress site into a woo theme. The original site from which the imports where made no longer exists but I have the media folder which I uploaded to the new site. I changed ...
1
vote
1answer
73 views

How add a group by to the query used by the media library?

What would be the proper way to add a group by to the media library query? What I have tired so far is not working: add_filter('posts_groupby ', 'limitMediaLibraryItems', 10, 2 ); function ...
0
votes
2answers
16 views

add titles to images in ad media in pages and posts

When editing pages or posts you can press the add media button. This shows a grid of all your images but it does not display the image names. I have lots of similar images and I would like a image ...
0
votes
0answers
100 views

Restrict access to files to logged-in users (WP + IIS)

I have a WP site, hosted on a Microsoft IIS, server which has both a public and a private, registered users only, section. The private section is a repository of pdf files. I've granted access to the ...
0
votes
0answers
16 views

Changing the media library view with code

Quite simply, how can I make the list view the default view in the media library rather than the grid view - using code? I came across $tab = apply_filters( 'media_upload_default_tab', 'type' ); ...
0
votes
0answers
186 views

Failed to load resource at admin screen

So I've done Wordpress clean install in a live server. Everything looks fine and seems to work. However, if I go to the admin's edit page or post and try to add or change the featured image, the Media ...