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]

An image, audio or a video comprises a media.

0
votes
2answers
19 views

core/gallery get figcaption text

I try to get gutenberg media gallery block output, and want to use default figcaption text feature for images titles (for js lightbox). How can i get this property figcaption text value? add_filter( '...
0
votes
2answers
28 views

Why does SVG upload in Media Library fail if the file does not have an XML tag at the beginning?

I have enabled SVG uploads using this code: add_filter('upload_mimes', function($mimes) { $mimes['svg'] = 'image/svg+xml'; return $mimes; }); However, uploads of SVG files that start with the &...
0
votes
1answer
15 views

301 Redirect Link to Media

I sent an email to some folks today with a link to a word document hosted on wordpress. The URL in the email is something like: www.mycompany.com/media/2018/06/somedocument.docx Unfortunately, ...
0
votes
2answers
56 views

It is possible to add custom media size in admin media edit?

Hi! It is possible without plugin to add ability edit custom thumbnail image size and apply changes to it?
0
votes
2answers
15 views

Display a mixed list of posts and media

I have a list of articles on my website. Some of the articles are post types with the "Article" category and others are PDF files uploaded to the media library, also with the "Article" category. I ...
0
votes
0answers
21 views

RSS media:content image to Featured Image

I can see lots of plugins and solutions for embedding a featured image into an RSS feed, but what I want to do is take an image that has been embedded in a feed and make it a featured image when the ...
0
votes
0answers
18 views

Wordpress Javascript: how to get the current frame of wp.media?

I know from the official docs (https://codex.wordpress.org/Javascript_Reference/wp.media) that you can create a new media frame this way: // Create a new media frame frame = wp.media({ title: '...
0
votes
0answers
10 views

Implement pagination on media library or stop infinite auto lazy load

I have a project with a quite extensive Media Library. Everytime an admin user gets into the Media Library it ends up making several hundreds of requests, as per default it progressively lazy loads ...
0
votes
1answer
19 views

Desktop is class List and Mobile is class Grid

<input type="radio" class="list" checked> <!-- checked, desktop --> <input type="radio" class="grid"> <!-- checked, mobile --> Here class list is desktop and mobile. I know it ...
0
votes
1answer
10 views

Images missing from the media folder

I have images that I uploaded to the media library and which are in use on the website but when I go to the media library they are missing - different ones at different times. The display of images ...
0
votes
0answers
9 views

Auto insert media file when drag'n'dropping inside post

the current workflow of drag'n'dropping an image inside a wordpress post edit automatically opens the media library, and you have to click the insert into post button. Is there any way to ...
2
votes
1answer
17 views

Can't access 'Store uploads in this folder'

I have had a problem uploading images from my laptop onto wordpress. Basically, the images are broken and cannot be viewed when implemented on the site. After trying to rectify the problem through ...
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
10 views

media library reorganization

I have a photo blog with monthly postings for almost 11 years. That's a lot of images. I don't mind the /year/month folder structure, but I have been sloppy in the past and not everything matches up ...
0
votes
0answers
15 views

How to display the list view in media gallery modal?

WordPress has the Grid View and the List View for the Media Gallery. Sadly I can't see the List View in the Media Gallery Popup Window, when inserting media into content. I've searched the web for an ...
0
votes
1answer
34 views

multiple image upload using wp_enqueue_media

I have created a custom plugin and there has an image upload option. In view page: <div class="form-group"> <label class="control-label col-sm-2">Trade Photo:</label> ...
0
votes
1answer
31 views

Theme loosing some images when moving to new server

This is driving me up the wall! I'm using the "Migrate DB" plugin to export the DB for the new server. I have a double change as in we are moving server, and also domain. http://thebodywisegym.co.uk -...
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 ...
1
vote
0answers
17 views

Is it possible to change 'Link to' in all images in all articles?

After some update, they all changed to none. Need to change to 'Media file'. Can I do it once and for all pictures in all articles? I see in the text of article difference between images with Link To ...
0
votes
1answer
32 views

Remove Featured Image & All Media Uploaded to the Post

I found a solution of removing featured image related to the post when delete the post from this article but, I want to remove all the uploaded media also with post removing. Delete all WP image ...
1
vote
0answers
18 views

Custom icons in media library

I'm trying to replace some icons for files in the media library based on the file-name / file-path. I want to give each file that contains the filename "example-name" a different icon in the media ...
-1
votes
1answer
51 views

Can't upload files 1MB+ [closed]

I can't upload files with more than 1MB, but i haven't change any configuration. I have a lot of files with more than 5MB uploaded before, but i don't know why now i can't... The error is "Failed to ...
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
10 views

Media Grid plugin Not lisitng allthe assigned images from the category

I am using a plugin for listing and searching images. I have created some categories and assigned some images to it, when I check in the front end it will display only some of the images, not all the ...
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
61 views

Add Media button of WP_Editor on custom role profile page not working

I have a custom role defined which has a separate profile page in the front-end. In the profile page there is a wp_editor with Add Media button. But the image is not being attached. This is the error ...
0
votes
0answers
36 views

Open the media library in Wordpress and make a specific image selected

I have created a Wordpress (meta) function in which you can add another feautured image. The workflow is pretty much the same as the featured image: The media library gets opened, you select 1 image ...
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 ...
0
votes
0answers
12 views

Customize Add Media screen

When using the Add Media screen from posts and pages, I'd like to group a few of the options (added by NextGen Gallery but not used very often) into sections that can be opened and closed like ...
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
21 views

Attachment metadata has value of '1'

While accessing /wp-json/wp/v2/media endpoint I'd got an error 500. Checking the logs, I'd seen the following issue: PHP Recoverable fatal error: Object of class stdClass could not be converted to ...
0
votes
1answer
22 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
1answer
23 views

How can to use the players from the Media Widgets in the body of a post to play audio and video files

I've been trying to use the <audio> tag to play MP3 files and the <video> tag to play MP4 files, both with the controls attribute, and they work fine, but it isn't possible to apply custom ...
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
1answer
61 views

How to display more audio file ID3 tags in WordPress

When adding an audio file to WordPress, it automatically takes the title, album, artist from the ID3 tags in the mp3 file. It uses these in the playlist and audio file attachment page. How can I make ...
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 (...
1
vote
0answers
69 views

How to install/enable mediaelement.js plugins in WordPress

MediaElement.js has a lot of useful plugins, such as jump forward, skip back, speed, etc. From my understanding (please correct me if I am wrong) WordPress core contains only MediaElement.js -- ...
4
votes
1answer
490 views

Set default image link target in Gutenberg image block

I want to set the default target of the image block in Gutenberg to "Media File": I've found solutions for the classic editor, and one that appears to work for Gutenberg galleries by editing the ...
1
vote
1answer
28 views

Can I hide certain upload folders in media library [duplicate]

A Plugin ( download monitor ) saves uploaded files in a certain folder called "dlm_uploads" within the WP upload directory. All files are visible in Media Library. Unfortunately the upload path cannot ...
0
votes
1answer
149 views

Gutenberg Block: Image resolution

Using the media upload element I created a custom Gutenberg block, that includes an image upload button. Now I would like to achieve one of the following: When an image is selected, it should select ...
0
votes
1answer
373 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
54 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
15 views

Moving attachment postmeta rows to new database

I am moving a lot of content from one existing (and damaged) Wordpress installation to another existing installation. I am trying to bring the media library attachments into the new site, but when I ...
0
votes
2answers
33 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
27 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 ...
1
vote
0answers
23 views

Overwrite media matching post title using WP CLI's media import command

I am trying to overwrite a media post using the WordPress CLI. The wp post create --post_type=attachment command can create an empty media item, but cannot attach an image file through WP-CLI. This ...
0
votes
1answer
60 views

While Ajax is working well, media upload isn't showing the imagines

Look at the image below, it has no javascript errors, and media upload still spinning forever :( I tried to install new Wordpress, also disabled all plugins, googled several times, I tried to do it ...