Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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
13 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
17 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
5 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
9 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
11 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
30 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
32 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
27 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
7 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
29 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
59 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
19 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
25 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
30 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
23 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
17 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
31 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
56 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 ...
3
votes
2answers
104 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
14 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
17 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
14 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
22 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
31 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
17 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
13 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
19 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
159 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
46 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
40 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
30 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
32 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
18 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 ...
0
votes
2answers
16 views

Attach media to multiple posts

I have a simple code where I am attaching existing in the library image to a post: function attachToPost($attachmentId, $postId){ return wp_update_post(array( 'ID' => (int)$...
0
votes
0answers
23 views

Use Remote URLs for WordPress Media Files

While it looks like this question has been asked before in some form, I still don't see a working solution. I am using WP Offload Media Lite which moves uploaded files to an Amazon S3 and then ...
0
votes
1answer
18 views

Media Library Latency, Lag, CRON?

When I add images to my Media Library they aren't available in the Media Library for about an hour. It seems like there is a queue or some sort of CRON that fires. The image appears in the media ...
0
votes
1answer
14 views

WordPress Link To Image Missing Dropdown

I am on the latest version of WordPress. When adding/editing a image in Wordpress there's the Link To Image which normally provides a dropdown menu. For me it's a blank text box and I don't know how ...
0
votes
2answers
47 views

Update media library attachments

I import image to wordpress via wp_insert_attachment. On frontend wordpress media library still don't know that image is imported. I need a way to update attachments in media library without ...
0
votes
0answers
41 views

Query all images with certain tag in media library using visual portfolio plugin

Introduction: I am developing a wordpress website and want to use the Visual Portfolio plugin (https://wordpress.org/plugins/visual-portfolio/). This plugin gives me the ability to display a gallery ...
1
vote
1answer
15 views

Manually mark imported photo as selected in media library

Using image/attachment ID I want to manually set image to be selected in media library in javascript. What's the simplest way to do this?
0
votes
1answer
31 views

Storing WordPress Media Library Uploaded files onto a separate domain

We are looking forward to offload assets from our website (60GB onto a 8TB/mo accessed website), to a separate webserver that will be there only for serving images from a separate domain. I know that ...
0
votes
1answer
41 views

Adding attachment custom field metadata to TinyMCE <img> tag

I've successfully added a custom field to the media upload dialog, but now I need (1) this field to be present on the <img> tag on post content whenever an image is inserted, and (2) a way to ...
1
vote
0answers
71 views

how does wp.media javascript library work?

I'm building a custom dashboard and I'd like to add a feature which allows a user to upload an image. However, by calling wp.media() (with a title, button & multiple args) javascript throws an ...
1
vote
1answer
51 views

How To Reset Ownership And Permissions of Wp-Content Folder, In Order to Fix HTTP Error When Uploading Images to WordPress Media Library

I've noticed several articles about how to deal with the HTTP error when uploading images to the WP Media library: How to Fix HTTP Error When Uploading Images? However, I've already tried adding ...
0
votes
0answers
10 views

limit media Library options with wp editor in frontend

using wp editor in frontend for user to add descriptions <?php $settings = array('textarea_name' =>'desc','quicktags'=>false);?> <?php wp_editor($user->description,'desc',$settings);...