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
1answer
19 views

Retrieve ONLY mp3s and set a variable for use in a playlist called by single.php template?

I'm trying to stuff a variable called $work_ids with the ID of any attached MP3 files for use in a custom player (based on MediaElement.js if that matters). The library contains WAV and other versions ...
1
vote
0answers
19 views

Media gallery thumbnails 1px

So I exported/imported images from one site to another (don't even want to get into the headache that has been causing!!) The latest issue is that it appears that all of my images have copied over ...
1
vote
0answers
27 views

Custom dropdown field added to media gallery; how to get it to save properly?

I am using the following code to add a couple of custom fields to media attachments: //Add custom fields for attachments function kgal_add_custom_fields_to_artwork( $form_fields, $post ) { ...
5
votes
1answer
156 views

How to get the image EXIF date/time and use it for the WP post date/time

I currently have the following working function. add_action('add_attachment', 'create_post_from_image'); function create_post_from_image($id) { if (wp_attachment_is_image($id)) { $image = ...
0
votes
0answers
22 views

How to add custom thumbnail size to media library's display settings / size?

I have added a custom thumbnail size in the functions.php of my template like this: add_image_size( 'post_mainpic', 750, 250, array( 'center', 'center' ) ); Now I want to be able to select that ...
0
votes
0answers
21 views

wp.media delete attachment callback

I am trying to build a plugin, where you can see and manage the image attachments that belongs to page/post. So when the user clicks on an image, the wp.media modal pops up. Then if the user deletes ...
1
vote
0answers
64 views

Customize WordPress Media Manager - Media Window

Im trying to customize the wordpress media manager "add media" window to get it as simple as possible to use. So i want to disable/ hide the following fields/ functions because i dont need some or ...
0
votes
0answers
11 views

Media Page: display Unattached option as default

I'm building a gallery which I want to output all the Unattached files from the Media Library. To make easier to the user, instead of displaying "all media items" as the default option, I want to ...
0
votes
0answers
15 views

Intercept an image before it's uploaded to Media Library

I've got a WordPress website where I need to have some posts with gifs as thumbnails. After researching this topic a bit I realized that I have to intercept the gif before it's passed into Media ...
1
vote
0answers
33 views

Trying to add filename over image in Media Browser

My client wants to be able to see the filenames of his images in the media browser (not the media library, the browser when you are adding media to a post or page). I used this snippet to do that a ...
0
votes
1answer
41 views

Dynamically Insert Image Into Stylesheet

Let's say I have a banner image I want to act as a background cover. Users manually upload their image with the Media library, which then associates that image with the post (image is handled using ...
1
vote
2answers
97 views

How can I add an Author filter to the Media Library?

By default the WordPress Media Library allows you to filter results by their type or date. How can I add a third drop down to list and filter by author? Currently we have this: I'd like to have ...
2
votes
1answer
113 views

Change the size of the image preview on the media edit page

I'd like to increase the size of the preview image on the media edit page. At the moment it's too small to accurately crop. ../wp-admin/post.php?post=2758&action=edit&image-editor
2
votes
2answers
72 views

Where do the favicons for Media Files come from

I have uploaded some PDFs to the Media Library. I cannot find a way to set the browser favicon for the PDF media files. Where does WordPress get the favicon from? Is there anyway to control the PDF ...
0
votes
1answer
125 views

Media Library doesn't allow uploads? Upload Directory

I just put up a WP 4.31 site. Most of the content was copied from a different WP site via FTP. All the stuff in wp-content: uploads, plugins,themes, etc. It all seemed to work as usual, and I've ...
0
votes
1answer
41 views

Wordpress lowers image quality

I am uploading to my site large images with media uplader and I want them to have 100% quality but wordpress reduces the quality. What should I do or what plugin to install to prevent this?
0
votes
0answers
30 views

Reuse / extend the Backbone toggle mode in upload.php

The WordPress media library allows us to toggle between selection modes. I'm trying to bind the existing Backbone function for toggling between selection modes (bulk mode) to a button I added to the ...
0
votes
2answers
117 views

Hook into backbone to add js to wp-admin -> media library?

I've enqueued a .js file on the "Media Library" page (upload.php). I need to hide and manipulate a few of the thumbnails on the page using JS only ( I'm not looking for workarounds ). The elements ...
0
votes
2answers
35 views

Additional folder where will Media Library look for files

I have additional folder (images/) in wp-content/uploads/ directory to store theme images (I heard it is good practice to place them in upload directory) and I want Media Library to list this files ...
0
votes
0answers
10 views

How to block image loading in Media Library during upload?

One of the things that slows down my Media Library upload experience, is that all the already existing images are being loaded/displayed. For me that makes no sense, since I´m uploading and I don´t ...
1
vote
1answer
53 views

Site icons with alpha channel for self-hosted Wordpress blog network

Either I'm missing something (or have something badly configured in my self-hosted blog network) or when I'm uploading a transparent .png file (with alpha channel) using Media Library, my Wordpress ...
0
votes
0answers
65 views

Use Media Uploader in Widget

I am trying to use the Wordpress Media Uploader inside a Custom Widget. When I use a similar code for a custom meta box inside the post edit screen everything works fine, but on the widget site it ...
1
vote
1answer
23 views

Ignore dots when searching in the media library?

As the title says, is it possible to ignore dots in search field in media library?
0
votes
0answers
113 views

“window.send_to_editor” only called in Wordpress thickbox/media-uploader if “insert into post” is clicked, not “save” button

I am using WordPress's media uploader by using the javascript: function handleMediaUpload(button) { //Enables returning the URL to input window.send_to_editor = function(html) { ...
1
vote
0answers
89 views

Media Library empty after server move (exact copy of files and db's)

After exactly copying both all the files and the database of a site over from an old server to a new one with the same URL (granted, DNS has not been switched over yet but not sure if that has any ...
1
vote
1answer
30 views

Filter Media by Featured on Admin

Usually we can filter images in Media > Library by: date by MIME type, and by attached/unattached files ...but I'd like to expand this to a filter by Featured images. This way, we could filter ...
0
votes
0answers
43 views

Link to a remote media library

I have been googling a lot about this issue and I cannot find a solution. I have an old website with a media library that is a bit over than 40Gb. In the meanwhile I have done a brand new one with a ...
0
votes
0answers
34 views

Custom menu item with tabs on media upload

I've been adding an extra link for inserting media in a post. The following url shows a sample code what I've used so far: https://gist.github.com/Fab1en/4586865 This is the result: But how do I ...
0
votes
0answers
12 views

Add tabs after Wordpress Media Manager 3.5 has already loaded

Does anybody know if it is possible to add tabs on the left-hand side of the media manager after the manager has already been loaded in Javascript. Is there a way to make an ajax call back to reload ...
0
votes
0answers
62 views

Reload or Refresh Wordpress 3.5 Media Manager

I was wondering if it is possible just to reload or refresh the new 3.5 Media Manager. I am currently running into a problem where I want to add new tabs dynamically but they are only added once I ...
0
votes
1answer
114 views

Wordpress ACF delete image from media library

I'm trying to use update_value filter hook of Advanced Custom Fields to write a function that when a user deletes an image from the field it will be deleted from the media library of WP as well. So ...
1
vote
1answer
66 views

resize from small images to large

I want to create large images though my original image is smaller. I have original images 1024x768 in my media library, and i want to resize these images to 1920x1080px in my WordPress posts. I ...
1
vote
0answers
31 views

Crop image with full width

Sometimes I need to crop images' heights in wordpress media library. When I try to crop the height it always decreases the width of cropped image by 2px. See the screenshot below. The original image ...
0
votes
0answers
155 views

File Not Found error returned when trying to access Media Library in Wordpress 4.2. Plugins cannot be installed either

Please help me figure out how to access my media files through the admin dashboard. All media files are present at the server level. I can upload a file through the admin dashboard, but cannot see ...
1
vote
1answer
26 views

Filter for Media Library

I want my users to apply a filter in Photoshop every time they upload an image. Naturally, people are forgetful so I want to remind them of that in the Media Library Screen. I search around which ...
0
votes
0answers
44 views

Render custom gallery fields

I'm trying to add a custom setting field to a gallery and render it as a class in the HTML. So far I have implemented this solution which works perfectly. Here is the working code: function ...
1
vote
2answers
91 views

Hide old attachments from wp media library

I am trying to limit the files that are shown in the wordpress media library popup (from wp_editor). Currently every single file that I have ever uploaded to my site is shown in the library but I ...
0
votes
0answers
110 views

Bulk Edit Media Including ACF/Custom Fields

I have two main questions but here's the scenario. I run a festival website. Photographers will upload photos to the site. They will need to relate it to an Artist and an Event, so when viewing the ...
0
votes
0answers
51 views

Remove caption from Wordpress gallery thumbnail grid

I have just installed Wordpress with default theme and I would like to create a gallery. I plan to have caption for each image, but I want it to only show on image popup, not on thumbnail grid as you ...
2
votes
0answers
37 views

Custom collection in media manager?

I'm working on a plugin that extends the media manager, load JSON based input data to render an own collection of images and may upload them to my wordpress media library. So far I got my own tab, ...
2
votes
1answer
71 views

Different upload path per file type

I want to have two different paths for different files. For example, I have all .zip and image files all in the same locations. What I am wanting to the have images in one path (eg. ...
0
votes
1answer
67 views

Which Hook? Hide attachments from specific post types in media library

as the title implies - I would like to suppress attachments of a specific post type(s) from showing up in the "Media Library" Not asking for a code example, but if someone can point me to the right ...
2
votes
2answers
470 views

What might cause a POST to wp-admin/async-upload.php to return JSON >and< HTML?

In the media tab, upload of a valid image file results in display of "HTTP error". Reload of the media tab shows that the image did upload and resize, though. Browser debug tools show that on ...
2
votes
1answer
140 views

Adding fields to the media uploader with jquery listeners

So I have the code to successfully add a select field to my media uploader (gallery view) which is cool, but I also need to add some jquery listeners to that field. I'm using the ...
0
votes
0answers
48 views

Changing attachment status from inherit to pending?

I'm creating a web library that consists of about 1,000 PDF files uploaded as attachments (in addition to pages and posts which contain other information). I've bypassed the attach-to-a-page/post ...
0
votes
0answers
48 views

How to delete all images and image meta data attached to a certain post type?

I have a custom post type called books, I have 1000s of images attached to these posts in books using Advanced Custom Fields. How can I run a query to delete all of these images that are attached to ...
0
votes
0answers
28 views

Checkbox group on attachments page

I am trying to add check boxes on media page depending upon no of roles in the system and I have been able to do that like this. function add_custom_attachment_fields($form_fields, $post){ ...
0
votes
0answers
42 views

Issues with Wordpress 3.9.6 media libraries on XAMPP

I am having issues with the media library of Wordpress on my local Xampp installation of Wordpress 3.9.6. Uploading files to the media library takes a long time and occassionally fails. However ...
0
votes
0answers
93 views

Accessing - Media - Attachment Display Settings - using wp.media

I'm trying to get options from - Attachment Display Settings - in my mg-media.js Trying to get selected size from user in mg-media.js. Here is, mg-media.js fn = wp.media.frames.fn = ...
5
votes
3answers
112 views

Add class=“media_type” when media is inserted into editor

I am looking for a way to edit the link that get inserted in the editor when the user choose to add a media. The goal would be to add a class with the media type (pdf) in the link. I know how to get ...