Stack Exchange Network

Stack Exchange network consists of 174 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
1answer
12 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
11 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
11 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
6 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
16 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
39 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
27 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
31 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
27 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
16 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
10 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
22 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
15 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
13 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
37 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
28 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
28 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
25 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
23 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
33 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
9 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);...
0
votes
0answers
8 views

programmatically add images to a post that I just added to the media library

I'm working on converting my old NucleusCMS blogs to WordPress. I have created a set of tables locally and began the conversion process. I've been fine right up to image conversion. NucleusCMS adds ...
0
votes
1answer
21 views

How to make Media Library use HTTPS?

I'm redesigning a site that originally didn't have a SSL. I copied the uploads directory, then did regular expressions on the wp db export file from the original site. In the Media Library, none of ...
0
votes
0answers
17 views

Editor User Role can't see other users media

The Editor role can't view/access other users media. Apparently, the website was working good everywhere but a few days later we noticed that. If we assign Administration roles, it works., Actions ...
1
vote
0answers
29 views

Make Categories a Dropdown Menu in Media Library

I would like the categories menu to appear as a drop-down in both the list mode and grid mode view of the Wordpress media library. As of now, it only appears as a drop-down in list mode. List Mode - ...
0
votes
0answers
18 views

wp_get_attachment_image_src calling wrong location

We are using the Exopite Simple Options Framework framework in our plugin. One of the fields is an image upload metabox: This works fine and images are uploaded and attached to the post as expected....
0
votes
1answer
14 views

Is it Helpful to transfer all media library to another host? [closed]

I want to transfer all media library including all images to a download host and my goal is the speed of loading website improve for example my website is example.com and all images load from cdn....
0
votes
0answers
13 views

How to display all images “Uploaded By” an author

Similar posts have been made on this but not the same as I what I'm looking for. Ultimately I need a gallery to be shown on a page which displays ONLY the images uploaded by the user who is logged in....
1
vote
0answers
37 views

WordPress 4.9.8 Trying to add filename over image in Media Browser

Need to add filenames of images in the media browser (not the media library, the browser when you are adding media to a post or page). I used this snippet to do that but it no longer works in ...
1
vote
1answer
39 views

Auto delete pictures in media library by age

I want to auto delete images in the media library that are older than 3 days. Is there a method to do this?
0
votes
2answers
220 views

Images not showing in media grid view (but showing in list view)

In my Wordpress install, thumbnail images are not showing in the media library, when in grid view. They are showing when in list view. In addition, if I once request a thumbnail directly, in the ...
0
votes
1answer
58 views

How to fix broken media library?

I asked this question and got no help at Wordpress.org. Here it is: Hi – Got a strange problem. When I go to my Media Library, I can’t see any of the images: Screenshot: https://postimg.cc/gallery/...
0
votes
1answer
14 views

After moving a site to new hosting, not all images are showing in media library

I have moved my website to new hosting. The site was originally in public_html/websites/dcworldholding/newsite on my server, on the new server its in public_html/ Some images are showing but the ...
1
vote
1answer
42 views

Cannot upload .mp3 file to wordpress media

I tried to upload a .mp3 file and wordpress rejected and display message: Sorry, this file type is not permitted for security reasons. This happened with some .mp3 file only. I'm using wordpress 4....
0
votes
1answer
16 views

how do prevent wordpress from creating permalinks for media files

Could one please explain how can I prevent WordPress 4.9 from creating permalinks/slugs for Media files without the need of installing another plugin? It's also important that the solution won't get ...
1
vote
0answers
17 views

Is it possible to share media files between multiple WordPress sites?

We've got around ten or so WP sites on different instances of WP (each with it's own database), most of them are on the same server but not all of them. We would like to achieve a situation where an ...
0
votes
1answer
23 views

Bulk upload images in upload folder does not show in media library

my website currently in staging site and I host it locally. Today, I upload some pictures from Live website to wp-content > upload folder but It does not show in Media library, however if I use ...
0
votes
1answer
10 views

Schedule image post on download

I have lots of schedule posts containing external images and I want to be able to auto download the images & linked to media library when the post status changes to publish. This is the code so ...
0
votes
0answers
13 views

How to fix custom add menu page preventing media library from loading

functions.php require get_parent_theme_file_path( '/inc/option-admin-page.php' ); option-admin-page.php function admin_page(){ add_menu_page('menu page','Option Panel','administrator','...
0
votes
1answer
134 views

Image Upload Custom Form Field for Category and Custom Taxonomy

I am currently customizing a Wordpress Theme, and I want to add a new form field on Category for uploading an image. The image should be retrieved from the Media Library. I found out that there are ...
0
votes
1answer
26 views

Removing images deleted from uploads folder, from Media Library

How can I remove images that have been deleted from the upload folder, from the Media Library?
1
vote
2answers
227 views

WordPress Issue : The uploaded file could not be moved to wp-content/uploads/

I have created a local WordPress 4.9.8 setup with PHP 7 inside a Fedora running machine. When I try to upload media into the WordPress admin, it keeps saying that The uploaded file could not be ...
0
votes
0answers
179 views

Delete images for unused media image sizes, without regenerating other thumbnails

I have set 5 custom image sizes in my theme. On top of the 3 default image sizes, I have around 10 other unused image sizes from a plugin that I'm not using anymore. I want to delete the images for ...
1
vote
1answer
13 views

Convert (-) and (escape) signs to (_) when uploading files on wordpress media library automatically

For internal purpose, I'm looking for to convert (-) and (escape) sign to (_) automatically when we upload a file (photo,video,audio) on WordPress media library. Example: If i try to upload this 2 ...
2
votes
1answer
130 views

Download external images if post is publish

I have scheduled posts that contain external images. I want it to automatically download images & linked to the media library if the post status is publish. Now the problem is my code won't ...