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
0answers
7 views

Count for Media Library Attachments specified by Categories

I've added this function into my function.php file that allows me to specify images in my media library with categories. /* Add Categories for Media Library Attachments /*------------------------------...
0
votes
2answers
30 views

upload_max_filesize is set to 64 MB already but WordPress is still showing 2 MB

I have configured the upload_max_filesize directive to 64 MB in my localhost php.ini and have my Apache restarted. But why the Media section in my WordPress still showing 2 MB below? Maximum upload ...
0
votes
0answers
16 views

display image name in wordpress media library (grid mode)?

I would like the name of the images to appear in the grid view of the wordpress media page. is this possible from functions.php, to show the name of the image in the media page (grid mode)? many ...
1
vote
0answers
18 views

Update image via WP REST API

So I wonder if its possible to update images in the media library via the REST AP? Ive seen a github issue back in 2016 where its mentioned this its not supported in the REST API. Is this still the ...
0
votes
0answers
12 views

Disabling Media Library and Bypassing it

Actually I am facing an issue and I am new to WordPress. I want to disable the Media Library for non_admin Users. I want that the Users on my site can upload images without having to upload it through ...
1
vote
2answers
28 views

Audio file's length (duration) is missing from Attachment Details in Media Library [closed]

I'm uploading a different mp3 file to each post as an attachment and using wp_get_attachment_metadata() to print the duration of the mp3 file. Sometimes the response from wp_get_attachment_metadata() ...
1
vote
0answers
6 views

how to remove thumbnail and LiteSpeed Optimization column in media library list-view?

I've searched on the internet, and found out this code from this link function remove_upload_columns($defaults) { unset($defaults['comments']); unset($defaults['author']); return $defaults; } ...
0
votes
0answers
12 views

How to prevent WordPress Media Library from removing image?

I have a custom post type that must have its feature image. Its feature image also appears in the Media Library where user can delete the image/attachment file permanently. But I want to prevent user ...
0
votes
0answers
57 views

function add custom fields to media gallery

I know this has been asked before but I'm having trouble with it and this seems poorly documented. My goal: Create a function that adds multiple custom fields into each item in the media gallery. ...
0
votes
0answers
16 views

Exclude image title from site search results

A user pointed this out to me recently and I've been scratching my head trying to figure it out. Currently the standard wordpress search box on my site is returning images in my media library in the ...
1
vote
1answer
6 views

Pulling images from a subdomain

I have created a sub-domain img.domain.com and in the database I have changed the required paths inserting the root and the url to this sub-domain. I have also changed these paths in options.php under ...
0
votes
0answers
24 views

Uppload image from another source wp.media

I am writing an extension that will load images from third party sources and embed that image in WP media library. I cannot figure out how to manage wp.media to load such images. How it will work. ...
0
votes
1answer
16 views

Removing extra large generated images disables all crops

function filter_image_sizes( $sizes) { unset( $sizes['1536x1536']); // disable 2x medium-large size unset( $sizes['2048x2048']); // disable 2x large size return $sizes; } add_filter('...
0
votes
0answers
18 views

Save data is post using php front end

I'm newbie, i have a simple php file ,there is my data like, title, body content, feature image, category and 1 custom file I want to save this data in my post My coding look like this $title="...
0
votes
0answers
14 views

Thumbnail (featured image) and Media Library cleanup queries help needed

I inherited a website that was started 13 years ago, over the years the version of WP and themes have been kept current, however much of the older content (and there is a ton of it) was created long ...
1
vote
0answers
24 views

wordpress media library new uploads don't write to database

I recently updated a wordpress multisite to 5.6 and since that update, new uploads to the media library don't add new entries in the mysql database, and consequently don't show up in the media library....
1
vote
1answer
19 views

Not able to extend wp.media.view.AttachmentsBrowser

New to WP development here so please bear with me if I'm missing something simple... I am writing a plugin for the Media upload library which needs to get the selected media items in Grid View (for ...
0
votes
1answer
30 views

Filter media library by custom postmeta

I am using ACF plugin. I created a select field custom_select on ACF that is included to every attachment. ACF writes these values in the postmeta table. I now want to filter my attachments in my ...
1
vote
1answer
16 views

Media Gallery Images - safe to change permalink?

I am new to blogging and learning as I go. I wrote a few posts with lots of images and now that I am learning about SEO, I realize I need to add alt text and have names that are relevant to the image (...
0
votes
1answer
19 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
14 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
33 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
13 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
13 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
30 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
9 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
12 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
26 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
10 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
29 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
16 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
28 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
116 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
2k 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
22 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
11 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
28 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
18 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
30 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
13 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
23 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
10 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
22 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
20 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
16 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 ...

1
2 3 4 5
19