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

Two problems that are likely related to AJAX

Guys. I started a new WP website about a month ago. Recently, I ran into two problems that I suspect have something to do with AJAX but I'm not sure. The first problem is the Media Library showing no ...
0
votes
0answers
9 views

Is there an easy way to create a duplicate of a media library image?

In many cases WordPress Thumbnails are fine for displaying a smaller version of an image, however there are quite a number of tools which don't allow the choice of displaying a thumbnail, so an ...
0
votes
0answers
12 views

Media Library Cleanup A Thought Exercise

I have a site with roughly 1200 posts. Each post has a featured image and a few placed images in the content. Over the years we have had a bad habit of using the WordPress image editor to crop and ...
3
votes
0answers
30 views

What is “open()” in MediaUpload?

Googling (or searching here) on "open" is hard :) The readme for MediaUpload gives this example: <MediaUpload onSelect={ ( media ) => console.log( 'selected ' + ...
0
votes
0answers
11 views

Does using the WordPress Import tool still include attachment data if “Download and import file attachments” is not selected?

I'm in a unique situation where I have to import WordPress content into a production server, but I don't have SSH access to the server files or database. I can't install plugins on the production ...
0
votes
0answers
11 views

get_the_post_thumbnail() returning 404 for newly uploaded attachments in media library via thumbnail - filename discrepancy

Using get_the_post_thumbnail($post->ID,'thumbnail') to generate the thumbnails for a display. This was working for a very long time, but now we have switched an image on a post, and the URL ...
1
vote
1answer
15 views

Custom Media Modal and uploading

I am trying to add a unique custom tab to the Media Uploader using this code. var customMedia = wp.media({ state: 'customState', states: [ new wp.media.controller.Library({ ...
0
votes
1answer
10 views

Attaching a file to a page without adding to media library?

We are using WP for our new intranet, which will primarily be used for documentation and archiving. We have some pages where we want to attach PDFs, documents, images, etc. However, we do not want ...
0
votes
0answers
8 views

how to show authors their own posts and media files which they upload and and change some so their capabilities

how to show authors their own posts and media files which they upload and change some so their capabilities I also want to hide a plugin from authors panel in wordpress
0
votes
1answer
10 views

Do I need to re-register all my images in the media library after a migration?

I'm moving a 6+ years running WordPress site to a new (Azure VM / LEMP) server, taking the time to upgrade Ubuntu, Nginx, etc, and trying to clean up years worth of grunge. ~20 authors, 40k posts, 6+...
0
votes
0answers
20 views

Optimise wordpress database using SQL after deleting registered images from Media Folder

I have used Media Cleaner Pro Plugin to clean few batches of registered images. Additionally i have updated my functions.php so these unused images will not be generated in future. function ...
0
votes
0answers
9 views

Change caption length for image/image carousel

I'm looking for a way to change the number of characters displayed for caption in frontend page. for example i have this caption text : "WordPress is a free and open-source content management ...
0
votes
1answer
9 views

Items from media library won't get added to a custom taxonomy

So I created 2 custom taxonomies and attached these to the media post type for 2 types default products and season products and I used them for a special page on a site where the owner can upload ...
0
votes
1answer
16 views

Allowing .rfa Files In Media Upload [duplicate]

I'm using the plugin File Upload Types, trying to allow .rfa uploads. I've tried the three MIME types below to no avail. Do you have any suggestions? application/octet-stream application/rfa ...
0
votes
0answers
12 views

how to tell polylang not to change images urls?

using the free version of Polylang with Astra theme (no visual builder) Initial site language is italian, and I’ve setup a .com domain for english. (so i used the multi domain translation option) Via ...
0
votes
1answer
23 views

Is there a way in WordPress to convert images to WebP without a plugin?

I'm building a simple WordPress theme for personal use. Speed is important. My Google PageSpeed Score is high, but it keeps saying that I should use WebP, rather than JPG. ('modern web formats'). As I'...
1
vote
0answers
11 views

Multisite - Images often getting uploaded to the wrong month directory

Previously I had only a single site enabled but recently enabled a multisite option. Now the issue is that the images are getting uploaded in the wrong month directory. It should be uploading to 11 ...
0
votes
1answer
62 views

Can't upload format files on media library

I have an issue for uploading .ppsx format on the media library. all the powerpoint format (pptx ppt, pps) can be uploading without problem except the .ppsx format and i don't know why. when i try to ...
0
votes
1answer
831 views

Wordpress media upload issue could not insert attachment into the database

Could not insert attachment into the database. When ever I try to upload new images from WordPress media it shows me above error. Please help me why wp database shows this error.
0
votes
1answer
21 views

How to add HTML into error message

php I have a filter for limit max upload file size with custtom message. I want to add link there, but html does not work here. Can you help me someone? Here is my code add_filter("...
1
vote
0answers
10 views

Suggested image dimensions Gutenberg Hook

I just migrated to Gutenberg block editor and I simply love it. After migration, I saw a dimension suggestion for images when trying to select the featured image. The problem is that we already have ...
0
votes
1answer
18 views

custom sorting media with multiple filters - error: not unique table/alias: wp_postmeta

I tried to add a column "Downloads" in the media library and make it sortable. This all works fine, but as soon as I search for a filename next to the sorting, the following error occurs: ...
0
votes
0answers
14 views

The grid view for Media Library requires Javascript error

Please help. I'm not able to upload images or view library in grid view. It just continues to show loading sign. I captured following image from console response.
1
vote
0answers
15 views

Prevent a folder from being shown within the media library

We have a folder of secure files which are currently PW protected through htpassword with NGNIX. Those files are currently inside the/wp-content/uploads/ directory /wp-content/uploads/secure-files/. ...
0
votes
1answer
9 views

How do you find a file in the media library using the file URL?

We have about 2000 files in our media library and we are working on an audit to organize the files and create a name hierarchy. But until that is done, I am trying to locate a handful of specific ...
0
votes
0answers
21 views

How Do I Change the File Permission For Uploaded Files in WordPress?

I have a WordPress installation, where any files that are uploaded by the user via the media library are set to the permission level 600 on the server by default. This results in the file not being ...
0
votes
1answer
8 views

Want to sell images online on wordpress but slow image loading issues

I wish to sell images, videos and music online but if I add the media files in WordPress, the website becomes slow. IS it possible to add a library? where I can upload thousands of images and videos ...
0
votes
1answer
20 views

MIME types not recognized by media library

We have several thousand MP3 files that were transferred to WP (from a dying Drupal site) via a custom script by the developer, with whom we don't have contact anymore. Wordpress, however, doesn't ...
0
votes
1answer
15 views

wordpress file upload from direct directory not working

I want to upload files from direct directory. But in my codes it will open media library then select files to upload jQuery('#t_pdf').on("click", function(){ // alert("got it"); ...
0
votes
0answers
12 views

Images not displaying, path in <img> is missing. Issue not found on another server

I have a problem with displaying images on the new server. On another one everything was working OK. I moved the site to names.co.uk and some of images are not displayed. The weird thing is that it ...
0
votes
0answers
12 views

Media Library category only visible for admin role / specific admin

I am new in plugin development so sorry if my question is stupid. My plan is that a specific media library category is only visible for admin users (or maybe a specific admin user). All other roles ...
0
votes
0answers
17 views

How to limit access to media library using wp.media on the frontend?

I am trying to make a frontend page for my plugin where users can create a post (CPT) and attach a thumbnail to it. I call wp_enqueue_media(); and use this HTML in the form: <div> <label ...
0
votes
0answers
23 views

How do I separate media into displaying in specific categories on WordPress homepage?

I have a site that has some custom code that pulls items from the media folder and displays them on the home page. We now want to possibly display the images pulled into specific category. How would I ...
0
votes
0answers
32 views

Insert HTML markup to page content from the Media Frame modal

TL;DR How do I get the HTML markup created in the Media Frame modal and insert it into the editor/page content? I'm trying to insert media from a custom router-tab in the media frame. But I have no ...
0
votes
1answer
24 views

Media Library modal customization

I have a fashion website and I use a large amount of images on my website, As I add new products I should add product images and for that I use media library modal but the problem is working with ...
0
votes
0answers
47 views

Change any image file format to 'webp' during media upload (with thumbnails in 'webp') and return the file path in the 'webp' format

I want to change the file format of any jpg/png/gif image uploaded (through media library / post featured image / gallery and wherever else applicable) to webp format (along with the thumbnails). Only ...
0
votes
1answer
45 views

Media library links broken WordPress Multisite after SSL update

We updated (not added) SSL to the site The media on the network admin media library works fine, but the media library for the sub-sites displays a grey box for example: Image url looks like this: (...
0
votes
1answer
29 views

Set different max upload size limits based on file type/extension

When uploading with video files to the Media Library, it's apparent that you need to increase the Max upload file size value. But this will be applied to all media types, including images and ...
1
vote
0answers
13 views

How to open default wp image editor screen dynamically?

I'm displaying gallery images of the logged-in users on the frontend with the edit button. Now I want to link that edit button with the default WP Image Editor screen that includes tools like crop, ...
0
votes
1answer
17 views

Which post/page an image is attached to

When I filter by unattached in the Media Library, it returns images that are used in posts and pages. Are there ways to see which specific posts/pages an image is attached to?
0
votes
0answers
44 views

Image srcset returns false for some images + Image Sizes missing from attachment

I have a weird issue going on in WordPress at the moment. Some images does not return any image sizes, and when using wp_get_attachment_image_srcset it simply returns false. I have no idea why this is ...
0
votes
0answers
13 views

Using PDF's Title as the Title in the Wordpress Media Library

I have a folder of PDFs created in Adobe Acrobat. Each of those has a title set in the document's properties. Most importantly is the title, which needs to go the Title Field when I upload to the ...
0
votes
0answers
33 views

Why are my audio files only partially uploading?

I have been operating this WordPress site for over six months. It is for a radio station. They have requested to have some of their special programming put into an archive on their site. I have been ...
0
votes
0answers
47 views

How can I remove the 'File URL' field from the image attachment editor?

When you go into the Media Library and select an image to edit, its associated 'Attachment details' page appears. On this page, there is a 'File URL' field which details the attachment file's URL. ...
0
votes
1answer
51 views

How To Watermark Audio

Does anyone know a way or plugin that will help me to automatically watermark any audio uploaded in the wordpress media library
1
vote
0answers
10 views

How do I migrate blog post images from one domain to a new one?

The conflicting articles I am finding on the web are leaving me more confused... :) For backstory, I work for a company that has been acquired by another. I am now tasked with moving all the blog post ...
0
votes
0answers
29 views

New Column in Wordpress with the file size and sortable

This code adds an additional column to see the size of the files. It works well! But I would like to be able to sort the files by size Any ideas? add_filter( 'manage_media_columns', '...
0
votes
0answers
18 views

Remove media from query which contains specific metadata?

I have been working on a solution to filter out specific files from my Media gallery. So far I have been able to do it with this function: add_filter('ajax_query_attachments_args', function($query){ ...
0
votes
0answers
17 views

Wordpress media library broken (Cloudfront, EC2, S3)

I have a problem I cant solve. I have a WP-installation on AWS, and using Cloudfront via WP-Rocket. I updated a few plugins, which broke a lot in the site. I uploaded the new plugins versions to our ...
0
votes
0answers
19 views

How to Import Media with a name more than 100 character?

I want to Import media from another site that I've exported. When I import media, WordPress automatically changes media names with more than 100 characters and deletes first words of the name and ...

1
2 3 4 5
18