Questions tagged [media]

An image, audio or a video comprises a media.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

Saving wp.media URL to database

I am having trouble saving the selected wp.media attachment URL to the database. The value of the hidden input seems to get the value, but the value is not being stored in the database. <?php ...
0
votes
0answers
8 views

How select multiple document as like media gallery

I want to make a document(.pdf) gallery with multiple selections exactly like the image gallery. So that when I click on a button or something wp.media selection frame will be popup and can select ...
0
votes
2answers
30 views

upload_max_filesize is set to 64 MB already but WordPress is still showing 2 MB

I have configured the upload_max_filesize directive to 64 MB in my localhost php.ini and have my Apache restarted. But why the Media section in my WordPress still showing 2 MB below? Maximum upload ...
0
votes
0answers
16 views

display image name in wordpress media library (grid mode)?

I would like the name of the images to appear in the grid view of the wordpress media page. is this possible from functions.php, to show the name of the image in the media page (grid mode)? many ...
0
votes
0answers
23 views

How disable image rename after edit

After cropping an image in WP editor I get this name Alex-e1616577687112-264x300.jpg. Is it possible to save in original name Alex-264x300.jpg
0
votes
0answers
14 views

Select Image from Media Library and insert into page with responsive markup

I'm building a site for my friend which uses a custom theme and no page builder. The home page has 4 splash images, and to make things as simple as possible for him I'm trying to create some ...
0
votes
0answers
12 views

Disabling Media Library and Bypassing it

Actually I am facing an issue and I am new to WordPress. I want to disable the Media Library for non_admin Users. I want that the Users on my site can upload images without having to upload it through ...
0
votes
0answers
10 views

Adding images (attachments) without moving images to WordPress uploads structure

In 'Settings' >> 'Media', the checkbox is set for keeping images in folders by month and year. However, I'm trying to add a new folder (my-custom-folder), with a ton of new images, in a big ...
0
votes
0answers
12 views

Display the copyright Text of media images

I followed the instructions on this site to add a copyright text of an featured image. https://bavotasan.com/2012/add-a-copyright-field-to-the-media-uploader-in-wordpress/ This worked fine, but it ...
1
vote
0answers
9 views

Media upload on Wordpress changes title of image

I have a rather random and annoying issue when uploading images for my products. If I upload one item it changes the title to mde or rhrn or a strange variation of letters. I've tried using the bulk ...
1
vote
2answers
28 views

Audio file's length (duration) is missing from Attachment Details in Media Library [closed]

I'm uploading a different mp3 file to each post as an attachment and using wp_get_attachment_metadata() to print the duration of the mp3 file. Sometimes the response from wp_get_attachment_metadata() ...
0
votes
0answers
17 views

MIME type not supporting HEIC support type in Wordpress

I am working on wordpress 5 and want to upload HEIC file type extension. But it doesn't work as it give me this error sample1.heic Sorry, this file type is not permitted for security reasons. But i ...
0
votes
1answer
19 views

RSS audio enclosures have length of zero (podcast duration is missing)

I have had success at creating an RSS feed with enclosures containing episodes of my podcast by simply creating a post and inserting an mp3 file from my media library into it via the robust Add Media ...
1
vote
0answers
14 views

Rebuild the entire WordPress uploads folder

I have an unfortunate situation in which a client disabled "Organize my uploads into month- and year-based folders" which is what organizes files into a {year/month} folder hierarchy on the ...
0
votes
1answer
26 views

Why Wordpress suddenly changed sizes of thumbnails?

I'm consistently using 3000x750 images for the standout images for my entries. I've recently added a new post with such image (I'm 100% sure about its size) and I've realized, that for some reason it ...
2
votes
1answer
73 views

How to overwrite wp_unique_filename logic

We are having a problem where uploading images through the media upload tool sometimes times out. Using NewRelic, I've tracked it down to wp_unique_filename, which makes sense I guess because we have ...
0
votes
0answers
24 views

Uppload image from another source wp.media

I am writing an extension that will load images from third party sources and embed that image in WP media library. I cannot figure out how to manage wp.media to load such images. How it will work. ...
0
votes
0answers
10 views

Uploading Pictures Simultaneously

Batch images can be uploaded to the "Media" folder in Wordpress. I'm having a problem here. Wordpress uploads all the images I choose one by one. I want all images to be uploaded at the same ...
0
votes
1answer
36 views

Shortcode for Custom Field of Media Attachment (to use with Featured Images)

I'm using ACF (Advance Custom Fields) for Media Uploads to store location information about photos. When I set a post Featured Image to a photo that has this extra field, I'd like to output the ...
0
votes
0answers
14 views

Create fake media / attachments with no actual file

I am working on a project where I have to upload headshots of personnel, and then add a title and description to the media. For those who don't have headshots, I don't want to have to upload a dummy ...
0
votes
0answers
26 views

How to get all id_attachment with one loop?

I have some lines of code which shows the url of my wordpress image gallery by means of an id, but I need it not to have to be selected by me, if not that every time an image is added, it is not ...
0
votes
0answers
18 views

Display data in media library to specific user group

I have two custom user-groups, which I had create in a user role editor. Every user-group has a special number of members. All members of one group should see the same content in media library. The ...
1
vote
0answers
24 views

Media Gallery Upload photo incorrect way like glitch

I start having this issue like 3 days ago, I disable all plugins but nothing works. See the examples: Original photo: after I upload:
0
votes
0answers
10 views

WordPress MEDIA NOT LOADING

I’m wondering if someone could help me out with this issue I’m having because I just CAN’T figure out what’s happening 🙁 /Technical Context/ I created a subdomain (‘dev.xyz.com’) for testing on the ...
0
votes
0answers
6 views

add_attachment hook Gutenberg

[UPDATE] Well, I was firing add_attachment into a conditional statement is_admin(), I suppose this is wrong. I am using the following code to fire when a new media is uploaded into the Media library. ...
1
vote
1answer
46 views

Create a new post using rest api and save featured image using an external image url

I am trying to create a post using the rest API. Which I am able to do with a fetch request as below. OurPostData contains the title, content and URL of a featured image which is an external url ...
0
votes
1answer
32 views

Is it possible to convert various image types from remote URLs to WebP and then serve them immediately?

I am working on a plugin that gets image URLs from an API, some being PNG, JPG, and others JPG without an extension. I've been trying to use a combination of download_url() and media_handle_sideload() ...
0
votes
1answer
10 views

Attaching a file to a page without adding to media library?

We are using WP for our new intranet, which will primarily be used for documentation and archiving. We have some pages where we want to attach PDFs, documents, images, etc. However, we do not want ...
0
votes
1answer
14 views

Thumbnail images chopped off but not cropped to exact dimensions

In Media Settings I have Thumbnail sizes set to width and height of 150 and "Crop thumbnail to exact dimensions (normally thumbnails are proportional)" is not checked. Since the checkbox is ...
1
vote
0answers
17 views

Restrict media upload size by format

I'm looking for a way to restrict the size of the media when uploading (a plugin or just a function). So I found this: function increase_upload_size_limit( $limit ) { return 524288; } add_filter( '...
0
votes
1answer
19 views

Upload media only to DB

I'm using the latest WordPress (5.6) and from what I've found out there's no visible setting for uploading media directly to a DB. Is there such an option somewhere hidden or does WordPress not ...
0
votes
1answer
10 views

where can i add custom script to stop header video from autoplay

How can I add the custom script from this answer to my site to stop the custom video header from autoplaying? $( document ).ready( function() { $( document ).on( 'wp-custom-header-video-loaded', ...
1
vote
0answers
32 views

media_handle_upload() progress bar

I'm using the media_handle_upload() function to upload several type of file in the media section of Wordpress Backend. Is there an easy way to have a progress bar linked to this function to give some ...
0
votes
0answers
26 views

WP Rest API Media Upload is Successful But Returns 500 Error

I was able to successfully upload an image via the WP Rest API using the following code: $this->guzzle_client->post( $this->trailingSlashIt( $this->url ) . $this->...
1
vote
0answers
21 views

WordPress: cleaning media library

I'm giving my website a clearout whilst I redesign it, and thought I'd delete a bunch of old images from the media library (about 50 or so). I thought this would free up a lot of space, but now I see ...
0
votes
0answers
32 views

Update media using REST API

I am trying to update media items data (title and ACF fields) using the REST API. I am trying the same method that I successfully used to update ACF data for post types. But it isn't working for media....
0
votes
1answer
19 views

Flat media folder vs multiple directories

I recently took over a website that uses a flat media folder in the site root. Is there a benefit to that over using the standard WordPress media folder structure of uploads/year/month/file? We have ...
1
vote
0answers
26 views

How can I get the media inside a post?

I’m new to WordPress, so please forgive me if my question is not clear or vague. I did a lot of research, but I didn’t figure out how to do the trick. I’m developing a Xamarin application for Android ...
0
votes
0answers
7 views

When a route is matched with media attachment it shows that and ignores my routing

I have custom routes using routes everything works fine, my problem is when a media is inserted it always bypass my routing. For example: domain/route1/internal-id if there is any media that matches ...
0
votes
0answers
11 views

WXR file - Media import failed - how to force import?

Say I have one Wordpress A that I want to move to Wordpress B (different IP addresses, different servers, different subnets). Server A is behind a private IP address. When selecting export function on ...
1
vote
0answers
90 views

add mediaelement.js plugins into WordPress video player control bar

im trying to add SkipBack and JumpForward Plugin of mediaelement.js into my wordpress [video] tag controlbar. so far i have added those to plugin js in a js file (videoplayerjs) like this : /*! * ...
0
votes
1answer
28 views

Is there a way in WordPress to convert images to WebP without a plugin?

I'm building a simple WordPress theme for personal use. Speed is important. My Google PageSpeed Score is high, but it keeps saying that I should use WebP, rather than JPG. ('modern web formats'). As I'...
0
votes
0answers
12 views

Put images in the media from url functions

When the client installs my theme I would like to automatically download images and add them to the media library, e.g. from links like this: https://images.pexels.com/photos/2228559/pexels-photo-...
1
vote
0answers
11 views

Multisite - Images often getting uploaded to the wrong month directory

Previously I had only a single site enabled but recently enabled a multisite option. Now the issue is that the images are getting uploaded in the wrong month directory. It should be uploading to 11 ...
2
votes
0answers
257 views

How to change upload directory based on frontend form input name or ID?

I created a frontend form using a plugin which allows logged in users to create draft posts. There are 3 file upload areas. I need 1 of them to use the default public WP media upload folder as usual. ...
0
votes
0answers
8 views

Stop generating thumbnails for a specific folder

I reduced unnecessary thumbnail sizes using a plugin. But there's also a media folder that I do not want thumbnails to be generated at all. Is there a way to stop Wordpress from generating thumbnails ...
0
votes
1answer
117 views

Can't upload format files on media library

I have an issue for uploading .ppsx format on the media library. all the powerpoint format (pptx ppt, pps) can be uploading without problem except the .ppsx format and i don't know why. when i try to ...
0
votes
1answer
34 views

Upload error on localhost (at minimum, not yet tested online)

uploading a picture on localhost I keep receiving following error: Post-processing of the image failed likely because the server is busy or does not have enough resources. stopping any upload, even ...
0
votes
1answer
2k views

Wordpress media upload issue could not insert attachment into the database

Could not insert attachment into the database. When ever I try to upload new images from WordPress media it shows me above error. Please help me why wp database shows this error.
0
votes
1answer
22 views

How to add HTML into error message

php I have a filter for limit max upload file size with custtom message. I want to add link there, but html does not work here. Can you help me someone? Here is my code add_filter("...

1
2 3 4 5
21