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
12 views

Mirroring uploads directory in media library [closed]

I have a project where we need to mirror a folder structure from the server and have it appear within the media library organized in the same folder stucture. I have looked into several plugins and ...
0 votes
1 answer
35 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 ...
  • 1,772
0 votes
0 answers
12 views

Images have dissapeared from media library and site

I manage a WordPress website for a client of mine. About a month ago she emailed me that some images are missing on the site. I have been investigating what could be the problem for a while now, and I ...
  • 1
0 votes
1 answer
26 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 ...
  • 1
0 votes
0 answers
14 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 ...
  • 763
0 votes
0 answers
22 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 "...
  • 817
0 votes
0 answers
18 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 ...
0 votes
1 answer
10 views

Wordpress Multisite Medial Library not working for .online domain

I have a wordpress multisite domain setup (subdirectory setup) and all the domains have been working fine (all end in .com). I've recently added a domain ending in .online. When I visit the media page ...
0 votes
1 answer
17 views

How do I restore attachment from files in wp-upload

I used the wordpress import tool to import a file and downloaded the attachments included. After a successful importation, I discovered that my media library only contains 3 file. After hours of ...
0 votes
0 answers
13 views

How to batch-add image file extension without losing DB refs?

I have a few dozen .png image files which do not have a ".png" extension. I know I can batch-add ".png" in macOS' Finder. But I presume this will mean the Media Library items lose ...
0 votes
0 answers
16 views

create a user's owned folder on user registration

I wanna manage my media uploads from all users. Wordpress just put all media in one folder.. after one year i will have 1000 users on my website and i need a good media management. I found this post ...
  • 1
1 vote
2 answers
69 views

Wordpress can't get image url but both the attachment and the actual file are there

The following applies to all attchment images on my site: There is a PNG image attachment, its ID is 519271. wp_get_attachment_image(519271, 'thumbnail', false, array( 'id' => 'esjb-preview-image' )...
  • 153
0 votes
0 answers
6 views

2 or more Wordpress instances (Live vs Staging Test site) --> access 1 uploads.domain.com -- images holder - see images in Media Library

RE: Media Library – Images (With Database entries) uploads.domain.com — contains all the images I use in my Main LIVE site. Installing wordpress in a few other subdomains. (Woocommerce, with 16k+ ...
0 votes
0 answers
37 views

My subdirectory sites images (except webP) are throwing to 404 page even they are exist

As I explained in the title, the images on my main site are fine, but the images on my sub-directory sites are not showing. Except for the WebP type, oddly enough. They are visible. İmages can upload ...
  • 1
0 votes
0 answers
11 views

media library contains corrupt doubles

After using the "add from server" plugin three times I imported three different uploaden FTP folders into the media library. Now I have issues in my media library: identical images with ...
  • 1
0 votes
0 answers
63 views

How do I troubleshoot Maximum execution time of 60 seconds exceeded in updating a Media File?

I'm on a shared hosting plan. Getting this error log entry when the user tries to update any field on a Media Attachment. [13-Oct-2022 20:10:05 UTC] PHP Fatal error: Maximum execution time of 60 ...
  • 763
0 votes
0 answers
29 views

Add link to media files in backend and modify linked images in the frontend

since a while I am looking for a way to add a "link to" option to the media library in the backend (this is working already - using the filter 'attachment_fields_to_edit') if there is a ...
0 votes
1 answer
7 views

Why some images are not allowed to be edited only for thumbnails?

please see this: As you can see, on the right columns I don't have the classic 'apply to' radios, where you can choose to apply modifications only to thumbnails. It happens only with certain images, ...
0 votes
0 answers
12 views

How can comments be turned off for media attachments on Wordpress?

I want comments always turned off for media attachments. I wrote the following codes to accomplish this. But this code is not working. I've also reviewed many similar topics: Resource-1, Resource-2, ...
1 vote
0 answers
21 views

Retroactively change Permalinks for media files after disabling year/month format

Disabling "Organize my uploads into month- and year-based folders" works as expected for new files uploaded. What I have not been able to find is if there is a way to also "move/...
0 votes
1 answer
7 views

Add Filename Colum to Media Library

I know this has been asked before: Add file name column to media library I tried the code. The Filename column was not polpulated. Then I followed Instead of substr( strrchr( $meta['file'], '/' ), 1) ...
  • 21
0 votes
0 answers
29 views

Question regarding the file path for media_sideload_image and wp_upload_dir()

Just need some advice on uploading images. I am using ACF / oEmbed to display a video in my blog and in the process extracts the thumbnail from Wistia which works fine. However, I need to put the ...
0 votes
0 answers
9 views

How can I modify the code generated for a PDF by the Add Media button in Classic Editor?

I am still using the Classic Editor. When a user creates a Post and uses the Add Media button to insert a PDF from the Media Libary into the Post, the generated code is something like this <a href=&...
  • 763
0 votes
0 answers
57 views

Is there a way to programmatically pass a category to the Media Library selector?

In the admin panel of my plugin I am able to make a form that uploads an image to the media library. The form's action page redirects to a post processing file that gets an $attachment_id, and then ...
0 votes
0 answers
30 views

Set a minimum and maximum limit of images to select in the MediaUpload component for Block

Say that I am making a Block that accepts between 2 and 5 images with the MediaUpload component as input. How would I go about that? Ideally for UI I would like the multiple and addToGallery props to ...
0 votes
0 answers
18 views

Uploaded images result in a file url with full path on disk appended

Problem: When I upload an image using Wordpress media gallery the file is written properly to disk, however the file url contains the full path on disk instead of the relative "/wp-content" ...
1 vote
1 answer
53 views

How to make media URLs Unique

I am having an issue with my project that requires my media URLs to be unique. I have found that if a media item is uploaded, deleted, and reuploaded with the same name in the same month, then the URL ...
1 vote
2 answers
363 views

Bulk delete media by year

We have large media library with more than 300000 images. We decide to delete all images < 2017 year manually using "FTP", from WP upload folder. But after that in WP Admin > Media >...
0 votes
0 answers
23 views

Why does "updated_post_meta" did not fire when uploading media other than image?

I am testing out the "updated_post_meta" hook by uploading items to media. I have notice that the hook is not firing if I am uploading files other than image. So I check the post_meta table ...
0 votes
1 answer
51 views

Programtically selecting image URL in Media Library modal

I've been struggling with Backbone for a few hours now while I'm trying to select a custom image URL in the media modal. The idea is to have a button that I've coded already and when the user clicks ...
0 votes
0 answers
16 views

User media folder for each users on registration

i need to create a "user folder" in media library for user registration using usermeta field, for example "billing_company".. so, my purpose is to procect file url inside that ...
  • 1
0 votes
0 answers
11 views

Change image data durgin upload

I try to change image filename and image meta during upload to media library. I have a problem with create unique filename hence, a bad slug is generated. Also, during upload, file uploaded by this ...
  • 1
0 votes
1 answer
41 views

How to stop media_sideload_image from running when deleting a post?

I have a code that downloads an image and saves it to the media library when you save a post that uses a certain block. The code runs perfect but downloads the image again if you delete the post. How ...
0 votes
0 answers
14 views

WordPress not showing manually uploaded files in Uploads folder on Media Library

I'm having a script on my wordpress site that uploads file to my site directory at wp-content/uploads while .mp3 is the file extension uploaded by that script. This script worked successfully but when ...
0 votes
0 answers
15 views

How to re-house images in uploads/YYYY/MM

My media items are not stored in YYYY/MM subfolders of uploads. Instead, I had cooked up some scheme to ingest posts, but seem to have declined/neglected to organise them that way. So, I've got a ...
1 vote
1 answer
39 views

Use custom image size in admin panel

I have add some image size like: add_image_size( 'custom-small', 600, 600 ); add_image_size( 'custom-medium', 1280, 1280 ); add_image_size( 'custom-large', 2560, 2560 ); and I have removed all the ...
  • 13
0 votes
1 answer
302 views

Update media library image shown in "attachment details" when using wp_insert_attachment to add item to the media library

I'm using the function wp_insert_attachment() to run on a form submission from GravityForms, take a file uploaded in the form, and add it to the WordPress Media Library. Code in functions.php below, ...
  • 206
0 votes
0 answers
184 views

Remove duplicate media entries from mysql database

I am wondering if you can help. I have a wordpress site with 90000 media entries, but only 1000 images. I do not want to remove the images from the media gallery just the entries in the database that ...
0 votes
0 answers
51 views

Larger preview thumbnails in Media Library

Is there a way to force the Media Library to use bigger preview thumbnails in grid and list views?
0 votes
0 answers
23 views

Filter Media by attached page or blog post in Library

I am trying to create a filter using restrict_manage_posts that will filter all media according the page or post type that have been attached to. Actually i need to create a filter that refers to the ...
1 vote
0 answers
125 views

Offload Media Library to other domain on a different server

How is it possible to change the media storage of Wordpress to a subdomain on a different server. The main domain example.com running on a server pointing to IP 192.168.0.1 and I've created a ...
0 votes
1 answer
52 views

Add media button always inserts media on the next wp_editor instance when created dynamically

This is a really weird issue. I am trying to store data from a form in a plugin settings page and allow users to add html code with wp_editor. The users can dynamically add as many fields as they want ...
  • 215
3 votes
0 answers
342 views

Using the <MediaUpload /> component outside the editor. select('core') is null

I am using the WordPress components in the admin panel of my plugin and trying to make an image upload button. The button works fine and allows me to select an image, but when I select an image, I get ...
  • 163
0 votes
0 answers
12 views

Custom image sizes showing in Classic Editor only when upladed directly to post

I can't get custom image sizes to appear in Image details size selector unless the image is uploaded directly in the post. If you choose an image from the Media library only default image sizes are ...
  • 1
1 vote
1 answer
57 views

Fallback media image for featured image not working in admin column

I want to display a fallback image if a custom post type does not have a featured image set and displayed in a custom admin table column. However all that is being output is the image url and not the ...
  • 125
0 votes
0 answers
337 views

get all images from the wordpress media library with link to the post they are associated with

I'm trying to get all the images from the wordpress media library with link to the post they are associated with. I'm using this code, I get all the images, but the link is the link to the URL of the ...
1 vote
1 answer
789 views

How to upload images in a specific folder using API

I have installed wordpress plugins Real Media library, Real Physical Media, and Media file renamed. Using this I am able to physically move images and organize images in the upload folder as per ...
0 votes
0 answers
19 views

How can i sorting and display image order by siz in media library?

How can i sorting and display image order by size in media library? Sorting is important for me? Any one can help me please?
1 vote
1 answer
85 views

Media library style not loading correctly when selecting a page featured image?

I'm trying to set a featured image to some pages, so when I press select featured images the media library upload UI not loading correctly its own stylesheet ( get images and search are working ...
  • 21
0 votes
0 answers
13 views

How to create wordpress media library UI on plugin page

I am trying to add this media library user interface just like it's used in WordPress. I have attached the image below. I know about the WP_LIST_TABLE class for creating tables, now what class do I ...
  • 561

1
2 3 4 5
20