Questions tagged [media-library]

Media Library is a WordPress panel that display all files you've uploaded. There you can add new files, attach files to posts and pages etc.

Filter by
Sorted by
Tagged with
0 votes
0 answers
3 views

Trying WP editor to load full size image (not '300x300')

The site used to have a plugin that created a lot of image sizes from uploads (150, 300, 800 px etc). I removed these images from the uploads folder bc they were not used by the theme. Now, the WP ...
Ludo's user avatar
  • 61
0 votes
0 answers
11 views

Convert entire media library to WebP, delete original images and update references

I am in the process of revamping an existing site. The process I wish to follow is to start with a new clean site, then export/import posts and images in batches from the old site to the new. In the ...
Brett Donald's user avatar
2 votes
0 answers
14 views

I can't see all images in my media library - How Can I reset the index of that library?

When I load my media library (either through the media tab on the left or editing posts/pages and adding images in that interface) it shows that I have 1206 images in my site. However when I click ...
pressword's user avatar
  • 360
0 votes
2 answers
51 views

Cannot Upload Video (MP4) File

It's a 28.8 M .mp4 file that has uploaded to another WP installation and is live. I'm trying to use the same file on a development server - a fresh install of WP with a media upload limit of 512M. ...
happycoffeebean's user avatar
0 votes
0 answers
41 views

"Media Library" shows as empty, despite images being present

I am trying to clone a WordPress site, but the files in wp-content/uploads aren't shown in the the Media Library: OK: I have created a new subdomain for a new installation of WordPress, and I have ...
Torben Gundtofte-Bruun's user avatar
2 votes
1 answer
64 views

WordPress Permissions Issue for Media Library / uploading

I've got some issues with file permissions which I'm trying to resolve... I have two sites and they both have the same permissions as far as I can tell but for some reason one site can upload files / ...
Ryflex's user avatar
  • 73
0 votes
0 answers
22 views

Why are PDF thumbnails over-saturated?

Often then colors of PDF thumbnails generated by Wordpress are wrong, they look over saturated. Is there something I can do to correct that, or is that caused by the PDF itself ?
mike23's user avatar
  • 5,991
0 votes
0 answers
12 views

How to search all the photos on my site for possible copyright violations

I'd like to search hundreds of photos in a wordpress media library on my organization's site to make sure there are none that are violating a copyright. How can I efficiently search all the photos to ...
Rob's user avatar
  • 1
1 vote
1 answer
27 views

Ajax response from Media Selection does not update ALL information more than once

I don't quite know how to explain what is going on, or how to title my post but I'm going to do my best. I'm making my first plugin for WordPress, which is very simple. Allow the user to select a ...
level42's user avatar
  • 113
1 vote
1 answer
132 views

Convert base64 string to WordPress attachment uploads multiple images instead of a single one

I'm trying to convert a base64 string to an image file and upload it into WordPress media library. It seems like the code is working, but, for some reason, every time I call this function it uploads ...
benjah's user avatar
  • 111
0 votes
1 answer
32 views

Media Library Issues

(All plugins disabled) I have some strange issues with the media library. It's an old site that I have been managing for the last 2 years. The site has dated media folders on disk going back to /2010/...
essexboyracer's user avatar
0 votes
1 answer
36 views

Different upload file size limits based on file type

I would like to put a different limitation on uploading content in the media library ( depending on file size and file type) For example : Upload mp4 (allow maximum upload file size 64mo) Upload pdf (...
Samuel's user avatar
  • 344
0 votes
0 answers
37 views

How to change media folder from created time of the post to publish date?

Now, all the structure of the media folder is under /wp-content/uploads/ and years-months combination from the created date of the post. Is it possible that his path will automatically change to /wp-...
Victor Ramos's user avatar
0 votes
0 answers
24 views

I'm planning to offload my WordPress Media Library to a CDN? Would you recommend it, and why (or why not)?

I'm currently setting up a brand new hosting server for a client of mine that owns a news site. One idea that was suggested by the team was to offload the Media Library files entirely onto a CDN. ...
John Doe's user avatar
  • 287
0 votes
2 answers
77 views

Removing filename searches when searching attachments

My website's db is quite big. I have some 350,000 images in the media library (as well as some 350,000 posts). My wp_postmeta table has 4,580,552 rows. As a result, some queries are insanely slow and ...
Biranit Goren's user avatar
0 votes
0 answers
46 views

"Virtual" image in WP Media Library (external URL)

We are using a CDN in an external system (DAM) to store all of our images, and I am trying to find a way to integrate this to WordPress. The functionality I would like to achieve is: Use the WP Media ...
user2868900's user avatar
0 votes
1 answer
47 views

Does Wordpress Super User or Administrators can create and edit post and media on behalf of a user

For my project I need to administrate user post and media without access to it personal account. So I must be able to create and edit a post (by is user name) before or after it has been created on ...
imagIne's user avatar
  • 53
0 votes
0 answers
35 views

Why wordpress doesn't allow to add author filter to media library page in grid mode

It appears that Wordpress doesn't allow to apply new author filter to upload page (upload.php) in "grid" mode. If it's right, why? If not, does it exist a specific hook/function to allow ...
imagIne's user avatar
  • 53
0 votes
1 answer
44 views

Unable to upload media files: Maximum upload file size: 0 B [closed]

All of sudden I am seeing the above. php.ini already have the following lines: post_max_size = 1024M upload_max_filesize = 1024M
Volatil3's user avatar
  • 353
1 vote
1 answer
85 views

How do you detect when an image has been deleted from WordPress media library?

I want to detect when the user click "Delete permanently" in media library so that I can use the post ID of said image to remove the image from my plugin. I have the below code, but it's not ...
www.matemingler.com's user avatar
0 votes
0 answers
53 views

How do I modify the TinyMCE editor Add Media button to insert a thumbnail preview of PDFs in addition to a text link?

We're still using TinyMCE as our post editor. When Editors use the 'Add Media' button to select a PDF from the Media Library, they choose the preview image from the Attachment Display Settings at ...
jchwebdev's user avatar
  • 765
0 votes
0 answers
98 views

Adding multiple MIME types of the same extension to WordPress?

I am trying to enable DWG MIME types for WordPress file upload, and tried applying this filter. However, because it's the same array, it won't work and will only apply the final one below. Wondering ...
cchow's user avatar
  • 1
0 votes
0 answers
40 views

Media Library empty or only 1 item when invoked from custom post type set featured image button

Custom post type 'offer' is defined in a 'mu-plugin' using ACF syntax including featured image support. Theme functions also explicitly declare featured image support for this custom post type. When ...
Ingo Steinke's user avatar
0 votes
1 answer
44 views

Detach Wordpress Media Files In Bulk

Just switched WP themes and I have about 1300 media files attached to what Wordpress is calling a 'Private Post'. These Private Posts are actually photo portfolios from the previous theme. 200 ...
Elemental Media's user avatar
0 votes
1 answer
94 views

Wordpress Media Uploader not displaying image that has just been uploaded

I am trying to implement a custom WP Media uploader within a plugin. I want multiple images to be uploaded also. I have the following javascript to open the media uploader. The modal opens fine and ...
JadeTech's user avatar
0 votes
1 answer
51 views

Is there a way to override only a portion of the function print_media_templates defined in wp-includes\media-template.php?

I'd just like to -safely- change the visual presentation on the Attachments pop-up window, ie. move some of the main DIVs around. But it seems like the only hook is to the entire function which is ...
jchwebdev's user avatar
  • 765
0 votes
1 answer
23 views

Media manager asks for file title when upload

When I upload a new file I have this error message : Content, title, and excerpt are empty. I found the error messahe in wordpress_data/wp-content/languages/en_GB.po line 6809 (but it's a post related ...
Sami's user avatar
  • 174
0 votes
0 answers
44 views

how to upload pdf or word file to media library with code

I'm adding a new feature to the cart page, that needs to upload files (word or pdf) to the media library. I am using this code ob_start(); ?> <form method="post" enctype="...
tiago calado's user avatar
0 votes
0 answers
14 views

Using "require_once" in my plugin breaks Media Library access from Dashboard

I am developing a plugin in Windows 10 UwAmp wordpress environment, with "Twenty Twenty One" theme. PHP 8.0.28, mysql 5.7.11, WP 6.2.2. At present my plugin file is as follows: <?php ...
SenderF's user avatar
0 votes
0 answers
9 views

How to add more images horizontally to existing gallery using elemontor

I deleted all my unattached images from media as I had so many copies not being used and now I'm missing all my images in my gallery. The grid is already there so it should only be to upload add the ...
Johanna's user avatar
0 votes
0 answers
14 views

possible to use media library with independent set of files in plugin?

I'm looking to have a page located in the Wordpress admin backend powered by a custom plugin have access to upload and manage previously uploaded images, essentially using the media library. But I am ...
Talk Nerdy To Me's user avatar
0 votes
1 answer
28 views

Add URL in image upload error message

I'm wanting to add a URL link into the image upload error message, but it's only printing the string, not adding the hyperlink. I'm using the code below function my_max_image_size( $file ) { $...
SolaceBeforeDawn's user avatar
0 votes
0 answers
29 views

image block select modal > custom tab on the media modal with filtered media and allow select media

I want to do a plugin to mark some media files as Favorite and then the favorite media marked allow be displayed on the Select image modal that is showed when a user try to add or replace an image via ...
juanbits's user avatar
  • 101
0 votes
0 answers
164 views

How to make Media Library files private?

I noticed that I can still browse my media library "attachment page" without being logged in. In other words, it seems like all you need to do is find one attachment page, and then you can ...
PJ Brunet's user avatar
  • 530
1 vote
0 answers
41 views

Is there any halfway decent documentation on the wp.media JS class?

Sorry for the somewhat rambly question, but has anyone ever seen any good piece of documentation, or maybe even a tutorial on the wp.media JS class? All that i could find documentation-wise is this ...
TimMKuehle's user avatar
0 votes
0 answers
18 views

in classic editor, is there a way to add media lib files to the content search when creating a link?

In TinyMCE Editor, one can highlight some text, hit Ctrl-K and search for a list of matching posts to link to. Is there a way to add Media Lib Attachments into that list of possibilities?
jchwebdev's user avatar
  • 765
3 votes
1 answer
117 views

How can I add custom sizes for PDF thumbnails generation?

I define custom image sizes in my theme like this : add_action( 'after_setup_theme', 'mwm_custom_image_sizes' ); function mwm_custom_image_sizes() { add_theme_support( 'post-thumbnails' ); ...
mike23's user avatar
  • 5,991
0 votes
0 answers
207 views

Editing alt text in media library

I added a column to the media library to display the alt text using this information, however I'd also like to edit the alt-text entry of each image without having to go into and edit each individual ...
Rowena's user avatar
  • 1
0 votes
1 answer
83 views

Files showing in link but cannot be found in the upload directory

https://fleurdelys.nl/wp-content/uploads/2018/04/legle-sous-le-soleil-5-100x100.jpg I have this file that really shows up in the browser. If i check the upload directory it can noyt befound in the ...
Albert Dilling's user avatar
0 votes
1 answer
373 views

What is the proper use of guid for images in wp_posts?

I understand that guid is a unique reference for a post, whether that post is a post or an attachment. When it's a post, I think guid is self-evident. But what is the correct formulation/destination ...
Robert Andrews's user avatar
0 votes
1 answer
112 views

Assign multiple categories to Media Library upload

I want to be able to upload files and either immediately or after upload assign multiple categories to them. I have 3 different kinds of PDF document: Treasurer report, minutes, and newsletter. What I ...
Lando's user avatar
  • 1
0 votes
2 answers
96 views

Media library upload hook

I would like to create a function that fires when a file is uploaded to media library to automatically assign multiple categories. So I created this code as proof of concept, but it is not assigning a ...
Lando's user avatar
  • 1
0 votes
0 answers
261 views

Block non logged in users from accessing the media library

I have a custom login page for a site I'm working on that isn't related to the backend login. The purpose of this is so users that aren't logged in cannot see the site. When the site loads it looks ...
justDan's user avatar
  • 101
1 vote
0 answers
46 views

upload image to wordpress media library failed for custom post type

image upload failed. I tried to upload gym logo as thumbnail image for gym post type. All the form elements are working. But image upload is not working. images are not appearing in WordPress media ...
Safayet hossain's user avatar
0 votes
1 answer
167 views

wp cli media commands not working

I am trying to bulk update media file captions through WP CLI so i can attribute image creators. My command is as follows: wp media list --date="2022-02-24" --format=ids | xargs -n 1 wp ...
challenge2022's user avatar
0 votes
1 answer
320 views

Image in binary in the data to WordPress media library

A specific API, returns an image in binary in the data. If I need to save it to the server, I can easily do it by following the code. $response = curl_exec($curl); // This is the API response ...
Ranuka's user avatar
  • 1,784
0 votes
1 answer
1k views

Many images in wp-content/uploads folder that are not in Media Library

I think my database must be out of sync, or something. I checked the wp-content/uploads folder in my Bluehost File Manager and I have many more folders and files than I see in the Media Libary. I also ...
Bobby's user avatar
  • 1
0 votes
0 answers
241 views

How can I change the page title of PDFs opened from a WordPress link which use the browser's viewer?

When you open a Media page and click the link to open an attached PDF, it uses the browser's own code to generate the HTML wrapper. And the HTML title is extracted from the PDF. We have many documents ...
jchwebdev's user avatar
  • 765
0 votes
0 answers
221 views

How to bulk edit taxonomies for attachments

I am looking for a way to bulk edit taxonomies for the attachment post type (basically, for images). I needed to categorize a large Media Library, therefore I added a custom taxonomy by using "...
Manu's user avatar
  • 817
0 votes
0 answers
336 views

Upload to a specific media folder created by FileBird Lite

I have an import that runs in the background of my server through cron. I have a plugin called FileBird Lite (https://ninjateam.org/wordpress-media-library-folders/) that helps create folders and such ...
Jason Is My Name's user avatar

1
2 3 4 5
20