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.

0
votes
0answers
11 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
21 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
29 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
16 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
10 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
79 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
12 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
41 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
23 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
25 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
30 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
7 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
12 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
35 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
10 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
170 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
33 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
90 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
38 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
31 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
48 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
26 views

Automatica crop image in wordpress 5.1?

original image size 777x518 when uploading this image it shows only 575x416 in WordPress 5.1. It automatically crops this image.I want, When uploading an image it will display your original size. How ...
0
votes
0answers
22 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
55 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
81 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
313 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
27 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
18 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
17 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
59 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
124 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
23 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 ...
0
votes
0answers
14 views

How to manually set an attachment in a post?

I need to manually set an attachment in a estate post with custom php. When it was the wordpress that inserted the image into the media library, this image appears in the post on frontend. However, ...
0
votes
0answers
7 views

Media File Replacements

I consistently have an issue in my media files. I frequently need to replace an existing pdf with a newer version. I go to the media attachment page, click "replace media: upload new file" with ...
0
votes
0answers
9 views

Media Library: Remove replace images of selected author

Bigger WordPress install here: ~14k posts, 20k images in media library (plus different image sizes - cropped & formats). Images are used - as featured image of multiple posts - inside content (...
0
votes
0answers
6 views

Attachment Page is not scraped by Facebook object debugger and returns 404 on W3 validation checker [duplicate]

I have code in my page header which properly creates the Open Graph tags for pages, posts, etc. However, when I attempt to Share an attachment post from the Media Library (not the actual attachment ...
0
votes
0answers
21 views

Adding Facebook Open Graph Code does not work for Media Library Attachment Pages

I have code in my page header which properly creates the Open Graph tags for pages, posts, etc. However, when I attempt to Share an attachment post from the Media Library (not the actual attachment ...
0
votes
1answer
380 views

How to wp_upload_bits() to a sub-folder?

I am using wp_upload_bits() to copy an obtained remote image... $upload = wp_upload_bits($file, '', wp_remote_retrieve_body( $get )); Image source example: https://logo.clearbit.com/starcomww.com ...
0
votes
0answers
82 views

What is wrong with my wp_insert_attachment code?

I am attempting to upload company logo images to my Media Library - but I am noticing some problems... Namely, some of those images seem to come in at 0Kb created. Source image URLs are all like ...
0
votes
0answers
55 views

After migrating media library is not showing thumbnails

We are currently running a script to migrate from a custom CMS to WordPress. Everything is going perfectly well except for the "media manager". The media is all stored on a S3 bucket. Here is a ...
0
votes
1answer
39 views

Handle image file and save it to media

I have function that gets uploaded file, save it, then crop it with imagecrop and now I need to save it again to the media. I know the way, how to do that with vanilla PHP, but I need file to be ...
0
votes
0answers
56 views

WordPress Media Library: Custom tab content displayed in “Media Library” tab

I write a WordPress plugin that is adding a custom tab in the Media Library. Problem is that sometimes when I open wp.media.frame content from custom tab is displayed inside of Media Library tab. ...
0
votes
0answers
20 views

Update WP Media Library image unattended

I have a restaurant website that is in Joomla that I want to redo in WP. The user takes a picture of their new menu item with their smartphone and after answering a couple of questions (which enables ...