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

Why is unfiltered_upload not working despite being enabled?

According to the Codex, all that's needed to enable the unfiltered_ upload capability - i.e. the ability to upload any filetypes to the Media Library rather than just the default whitelisted ones - is ...
0
votes
0answers
16 views

How to identify the location of wordpress Query

There is a problem in my WordPress dashboard that the filter button in the media attachment thrown an SQL error every time with the query. In that query I Found AND statement and parenthesis which is ...
0
votes
1answer
12 views

add_image_size() in custom theme is not generating and saving any thumbnail

I am creating a custom theme (WP version: 5.2.2). In functions.php I added a few custom image sizes in the following way: function abhijaan_theme_setup() { function abhijaan_theme_setup() { ...
0
votes
1answer
15 views

image not display in media library and thumbnail not display in post

some problems with importing images. (1) Upload folder images do not appear in the wordpress media area. The upload folder is already with 755 permission. (2) Thumbnail do not appear on the site. ...
-1
votes
1answer
19 views

How to disable Media Library?

I would like to turn off Media Library for the entire website and instead have the Wordpress to use DB to store media for every unique add. How do I do it?
1
vote
0answers
11 views

Restrict file types in the uploader of a wp.media frame

When creating a wp.media frame in JS, is it possible to specify allowed file types for the uploads tab? wp.media({ title: 'Pick a PDF', button: { text: 'Use this file...' }, ...
1
vote
1answer
44 views

Add media attachment filter to custom wp.media frame

Using wp.media function to create custom uploader popup I can't find argument to show attachment filters. if(typeof wp === 'undefined' || typeof wp.media === 'undefined') { return false; } var ...
0
votes
1answer
21 views

Overriding of the template for the Attachment “thumbnails” in the Media Grid isn't working

I'm trying to customize the template of the Media Browser (when clicking on "Add Media" button within Edit Post page), by adding a caption with the filename on each thumbnail so I don't need to select ...
0
votes
0answers
18 views

Media item permalink goes to source file instead of attachment.php

My Media Library permalinks are bringing up the source items directly and seem to be ignoring my attachment.php file. This is happening for both attached and unattached files. I'm trying to use ...
0
votes
0answers
40 views

How to refresh media library without refreshing page

I'm trying to update the contents of the media library after adding a new image. I use this line for this wp.media.frame.content.get().collection._requery(true); but it does not work after opening/...
0
votes
0answers
11 views

Replicate Media Galley Edit view in Add Media View

I need little support of you guys with regards to one of the functionalities which are regarding the WP Media gallery, so, any help will be really helpful to me. Thanks
0
votes
0answers
22 views

How to use MediaUpload outside of editor

I am trying to create an interface that allows users to manage data stored in posts that pertain to them without actually giving them access to the custom post type that is storing that data. ...
0
votes
0answers
14 views

Missing image in media library

I have uploaded image in Wordpress media library. It is not showing in media library. But I checked in wp-content there have uploaded image. right now what can I do?
0
votes
2answers
25 views

Images are randomy deleted from server

I've got a bizarre problem with a website I'm working on. Recently, when anyone uploads images to the site, some time later (maybe an hour, sometimes several hours) one or more images disappear ...
0
votes
2answers
62 views

Upload restrictions - upload_mimes - filter: Adding multiple MIMEs for a single extension and adding multiple extensions for a single MIME type?

Trying to add certain allowed MIME types to the upload filter - currently my custom function looks like this: // allow SVG and video mime types for upload function cc_mime_types( $mimes ){ $mimes[...
0
votes
0answers
17 views

How to set value for a Custom Field from Add Media panel in Wordpress?

In Edit Post page, I'm adding media from Add Media panel by clicking on "Insert into post" button. I'm trying to feed a Custom Field with the URLs from those selected images, but it is not working. ...
0
votes
0answers
11 views

Images returning in uploads folder

I spent hours cleaning up old thumbnails from the wp-uploads folder but I saw they all reappeared again. What could be causing this?
0
votes
2answers
80 views

Images are displaying as blank images

I am trying to upload base 64 encoded images to my website media library via API. API returns with image ID but these images are displaying as blank images in my media library. Here is my code ...
0
votes
0answers
16 views

Metabox Upload custom MIME file type not show in Media Library

I have made a theme to allowing uploading of files like GLB format to be used in WEBGL 3D rendering in a post. Here's the code for adding supported file type: function my_myme_types( $mime_types ) { ...
0
votes
0answers
8 views

Show Files From Specific Directory in Custom Media Uploader

I want to upload/show files to/from a specicific directory in a Custom WP Media Uploader. For reference, I am using this tutorial https://github.com/smartcatdev/WP-Media-Uploader Here I only ...
0
votes
1answer
35 views

Extract url of every image in library?

I'd like to make a PHP script to output the full-size URL of every image on the WordPress library. How can i make a foreach of all images in the site?
1
vote
1answer
45 views

how to get URL of media uploaded to WordPress via media_handle_sideload()

I'm trying to upload a photo from an URL then set it as the feature image of a product that user is submitting Now I can do the first part of this function the problem is I can't get the new URL of ...
0
votes
2answers
27 views

Remove delete-attachment button for every media

I'm trying to find a way to permanently remove the delete_attachment button from the media details modal. I don't want to use CSS to do it... and haven't been able to find a way as of now. Does anyone ...
0
votes
0answers
29 views

Post images are not displayed in media library

I use an image for a page that is uploaded back in 2014 up until now and back then I uploaded few images as well. But when I looked into the library, I could only find the images that are uploaded ...
0
votes
0answers
14 views

Can't add image to new post

Our website was recently updated to Wordpress 5.1.1. From this recent update we had some issues that writing posts. When we click "Add media", it shows the media modal with loading indicator and stays ...
2
votes
1answer
56 views

Create custom tab in WordPress 5 media upload

Can someone help me create custom tab in WordPress media library. With WordPress version 4 i used to media_upload_tabs function to build that nice work. But now, in WordPress version 5 the function is ...
0
votes
0answers
8 views

Best way to move some sites from a WP multi-site environment, to another WP multi-site environment

For clarity, we have to WP multi-site environments. We want to move some sites, but not all sites, from 1 to the other. So moving sites from 1 multi-site environment, to another multi-site ...
0
votes
0answers
11 views

select Multiple file from Media on mobile device

on a front end form I am using media uploader to attach multiple images to a posts. however on mobile device I can not select multiple images from the media. is there a workaround?
0
votes
0answers
13 views

Possiblity of bulk restore original image

Is there a possibility to use a bulk restore function of cropped images? At the moment the only possibility to use this is on each single image: Is there a way to apply this to all pictures in my ...
0
votes
0answers
58 views

Wordpress Media Library rendering blank image tiles

Problem: I have been experiencing an error with all my images on my site. When I navigate to my website in any browser, none of the images are rendering. When I login to my admin portal and navigate ...
0
votes
0answers
11 views

Media Upload Attached Old Subdomain

I moved the website from a subdomain directory to a new directory on the main domain. From subdomain.mywebsite.org/folder To: mywebsite.org/folder However when I upload files with the media uploader ...
0
votes
1answer
345 views

Uploading pictures to the Media Library: “Specified file failed upload test.”

I changed my domain this week and lost most (but strangely, not all) uploaded pictures in the Media Library. When I try to re-upload them I get, "Specified file failed upload test." I’ve enabled the ...
0
votes
0answers
9 views

External file server, to store and exchange files between wp-frontend and c#/winforms application

This is my first question here, so please bear with me. I hope its not too unspecific. Im stuck since several days now and i dont seem to find the answer myself. What i want to do: I want to build a ...
0
votes
1answer
29 views

Reorder attachements in the media library

I have a plugin that takes an user selected image from the media library, puts some special effects on it, and then saves a copy of the "enhanced" image back to the library using media_handle_upload()....
1
vote
0answers
8 views

Add media library items to Menus using the Customizer (via Media Manager not URL)

You can add links to files in the media library URL via the Custom Links panel of the Customizer but for clients this requires multiple steps including cutting and pasting a URL from the media library ...
0
votes
2answers
36 views

Looking for Image Slider that is based on default WP Media Library

For my WordPress site, I want to have a new solution for my image sliders. What I expect in the frontend is a slider like I have here: https://my-road.de/la-digue-guide/ But I am not happy with my ...
0
votes
1answer
119 views

Set featured image from auto generated video thumbnail url php

// Set video generated thumbnail as featured image*** if(isset($posted_data['video-file']) && $posted_data['video-file'] != ''){ //Wait 10 seconds for thumbnail to be generated ...
0
votes
0answers
57 views

Ajax Issue for Add Media (Not All Images Load)

I'm working on a website that has over 300 images, using WordPress 5.1.1 with Classic Editor enabled. In Media Library, I can view all the images since it uses pagination. However, when I click Add ...
1
vote
1answer
38 views

shortcode to output multiple images urls from media library id

I am writing some custom shortcode which outputs an images url from its ID. I would like the shortcode usage to be as follows: [imagez id="211046, 211034"] This is my code: function image_thingy($...
0
votes
1answer
62 views

Front-End Upload media with category

Hello i have a page with a little uploader to upload media in the library, here is my code : <?php $post_id = $post->ID; if ( isset( $_POST['html-...
0
votes
0answers
28 views

WordPress multisite - media library has wrong links

I have a WordPress multisite with around 30 sites on it. We've just come across a link on Google, with a Word document that has the wrong URL: the document appears to be in the Media Library of the ...
0
votes
0answers
81 views

Images uploaded via Gutenberg image block are cropped

I'm trying to add images to a post with the following work flow using the Gutenberg editor on version 5.1. Add an image block -> select upload -> select image. The image is uploaded to the page and ...
0
votes
0answers
114 views

Attachment metadata randomly missing

I have this website with about 3000 posts and 4000 images in the media library. For a long time now, some image thumbnails will randomly disappear from the media library: When I click to open the ...
2
votes
2answers
562 views

Regenerate missing _wp_attachment_metadata

For some reason, some of the thumbnails of my media library are randomly becoming missing. I've found out _wp_attachment_metadata isn't present in the database for those images with missing ...
0
votes
0answers
51 views

Export media library with metadata and import into new blog

I am looking for a way to export my media directory, along with all meta data and import into a new blog I can download all files via ftp, but i would lose all title and alt attributes associated ...
1
vote
0answers
19 views

Stop WordPress from generating redundant image size

I have on media settings the following setup: The problem is that when i upload an image that's exactly 640px wide it makes a copy like so: image.png image-640x640.png That would make sense only if ...
0
votes
1answer
19 views

Change thumbnail size for Media Library

I can't seem to find a way to change the size of the images in the Media Library. For some reason the full picture is being loaded in the media library, and this makes it really slow. I've tried: ...
0
votes
1answer
113 views

Thumbnail images missing in WP media library

I have built my own WordPress theme and applied it to my WordPress website. The issue I am having is out of the blue, the thumbnail images from the media gallery have stopped loading in and now just ...
0
votes
0answers
198 views

Restrict Access to media files

I'm making a video streaming website for paid members like Netflix. I uploaded files http:// .. wp-content/uploads/_pda/videos/sample.mp4 I want to hide or redirect if users try to access this url/...
0
votes
1answer
30 views

Creating multiple instances of Media Uploader

I have added the Media Uploader to our plugin, but it is creating multiple instances somehow. The Model is created twice. One with the configurations and one appears to be the default instances. I ...