Skip to main content

Questions tagged [media]

An image, audio or a video comprises a media.

Filter by
Sorted by
Tagged with
0 votes
1 answer
817 views

Import download attachment from woocommerce product

I am doing a migration from a wordpress/woocommerce website, I've successfully export/import all the data except one thing : the download attachment file from my woocommerce product I'm using the wp-...
0 votes
1 answer
1k views

Media Attachment Custom Meta Fields not saving in Media Uploader when using jQuery UI Autocomplete

I am trying to write a plugin that adds a custom meta field to image attachments to give images a credit field. I use the 'attachment_fields_to_edit' and 'attachment_fields_to_save' filters. ...
0 votes
1 answer
968 views

How to split my uploaded media into directories?

I am reading the documentation of WordPress Media Library and it seems to me that it doesn't allow me to split my uploaded media into directories. Is it true? Why this choice? How can I implement ...
0 votes
3 answers
1k views

Multisite has SSL certificate, but media library is still http://

Our multisite WordPress installation has a URL of https://xx.com for the main domain, and - for example, https://yy.xx.com as a subsite. We're using WP's in-built domain mapping feature. Media ...
0 votes
2 answers
51 views

This image cannot be processed by the web server. Convert it to JPEG or PNG before uploading

This image cannot be processed by the web server. Convert it to JPEG or PNG before uploading. description: https://ibb.co/r31V1gk
1 vote
2 answers
2k views

What is the alternative to `<?php the_content(); ?>` when it comes to calling Media (image) files in the 'attachment.php' file?

I am in the process of putting together my own WordPress Theme. Up until now, I have been using the 'single.php' file to act as a Template for both my Blogs and Media Files. In reference to my Media ...
0 votes
0 answers
16 views

Multiple image selected -> only first added

wordpress 6.5.4 I select multiple images from the native media viewer but only the first is added every time. This seems to be new after update to 6.5.4. Not sure how to fix this ?
2 votes
2 answers
5k views

How To install AWS SDK for PHP in wordpress?

I am going to install and use AWS SDK for PHP to facilitate uploads/list objects directly from the front-end of my WordPress instance to S3. What is the best practice to do that ? P.S: I don't want ...
0 votes
1 answer
24 views

Get Specific Files (Only Specific Extension Type All Files in Loop ) from Media

I want to get Specific Extension Files from Media of Current Post Uploads—for Instance, .jpg or .png or .pdf, or MP4. (Get Only 1 Extension All Files From Current Post Uploads) Specific Extension ...
0 votes
1 answer
697 views

Admin Ajax returns "0 200 OK server error.." in Multi-site sub-site

I'm aware admin-ajax.php is intended to return '0' if there's no action set. My issue seems to be that it's returning an error after the '0'. Accessing the file mu.site.com/wp-admin/admn-ajax.php ...
0 votes
1 answer
24 views

Cannot add image (png, jpeg, etc.) but can add pdf, 403 forbidden when posting

I just encountered a bug when I am trying to post with images. When I am adding media using "Add Media" button, the image will not add and will have this error: POST https://philsa.gov.ph/...
0 votes
5 answers
8k views

Media Library is not loading on grid view in admin panel

Media Library is not loading on grid view and also featured image not select any image from post and page . The progress circle keeps spinning. Due to this issue, I am not able to add any image in the ...
0 votes
1 answer
2k views

How to create different media uploader frames / filter library depending on a custom action

Here is the thing. I am using the WP media uploader on the frontend. What I need is to have it behave differently depending on a certain action. I am attaching the media in a specific custom post ...
0 votes
0 answers
18 views

Enable Downloads on WordPress Attachment Page

I'm currently working on a WordPress site and need some help with enabling downloads for video attachments on their respective attachment pages. Since the videos are being handled in bulk, I'm using ...
1 vote
0 answers
14 views

Wordpress is adding "-1" to the filename of media items

On a website I administer, I just noticed that Wordpress is adding "-1" to the filename. Which is expected behavior for a file that has already been uploaded. But these files have not been ...
0 votes
0 answers
17 views

Images being uploaded via WP Media are not attached even they are used by some CPT posts

I would like to delete thousands of images on my WP websites which are no longer used by some CTP posts which have been removed even from Trash folder. However, I found out that Images being uploaded ...
0 votes
2 answers
787 views

How to display the Media Library Items Upload date

I have a product image catalogue and i'd like to display the Uploaded date of the image: I can see on the media library it displays on-top of the item: Uploaded on: April 15, 2021 as an exmaple but ...
0 votes
1 answer
1k views

MP4 file links download instead of playing

How can I make MP4 file download the file instead of playing it on wordpress?
0 votes
1 answer
1k views

Disable wordpress gif compression?

Is it possible to disable the default gif compression in Wordpress. I'm uploading animated gifs and they are turning soft. Any advice much appreciated. Attached is a screen grab illustrating the ...
0 votes
1 answer
2k views

Images not loading on webpage, and links to other media give 404 Not Found

Had some recent problems where to start with only homepage text was visible, all other pages/links gave 404 Not Found. Now managed to get pages to function but all images fail to load, plus links to ...
0 votes
2 answers
24 views

Wordpress MediaElement audio player won't seek and resets back to the start when files are locally hosted

Edit: If anyone runs across a similar issue; the problem was I had Cloudflare DNS Proxy turned on for my server and that was causing the audio issues. It seems to be a semi-common problem from ...
3 votes
3 answers
2k views

Retrieving JSON data in ajax request from media uploader

I'm having some problems getting my JSON data that's being passed via an ajax request. I'm trying to implement the media uploader into a plugins settings page. I've got it functioning properly using ...
0 votes
1 answer
1k views

Hide download button from audio player

[embed width="28"]http://audio.itunes.apple.com/apple-assets-us-std-000001/AudioPreview91/v4/e7/e0/fb/e7e0fbfb-5582-ee65-6a81-823b5ecf9186/mzaf_5076836927047056840.plus.aac.p.m4a[/embed] Since ...
0 votes
1 answer
27 views

When inserting media file in a post or page, show file name under the thumbnail

When using insert media into a page it shows a grid of pictures. How can I change that to see file names instead (or both)? And would there be a way to have the images sort by file name?
0 votes
0 answers
24 views

How to Upload a media item with alt text and description

I'm trying to upload a media file to the media library with the altText and caption for it using the media endpoint: https://developer.wordpress.org/rest-api/reference/media/#create-a-media-item ...
3 votes
1 answer
1k views

How to disable drag-and-drop upload function in Media Library?

Does any one knows a valid/standard way to disable drag and upload when accessing the media library in the admin area? In order to make this sense to you, I'm building a multisite and user of sub-site ...
0 votes
1 answer
719 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
2 answers
1k views

upload image with rest API to the media library

I am working on uploading an image to the media library and then attaching it to the featured image. I put the code below in my functions.php file and submitted a JSON file through postman, but for ...
1 vote
2 answers
1k 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?
1 vote
1 answer
971 views

Is it possible to use media_sideload_image to upload local files?

I want to add media_sideload_image to upload a file programmatically . I've got it working when the image URL is online (e.g. http://etc...) but not when it's a local file from my hardrive or network ...
0 votes
2 answers
757 views

Missing a temporary folder not fixed

I uploaded my first wordpress website on the server, but trying to add new media files, i have got the message "Missing a temporary folder", I tried the solutions on the forum: define('...
0 votes
1 answer
3k views

Media and all images disappeared from my wordpress site

I only added a plugin call WPFreshstart 5 to my site and later when I went into my site I noticed all media library was gone and all images thru out my site were gone even the widget area. I deleted ...
1 vote
2 answers
1k views

Restrict WordPress Media Library for a specific user role (users can only see/select own media)

I have 4 roles in my platform : administrator, author, editor, external I need to restrict WordPress media library access to the user’s own uploads only for one users role (external) on my platform. ...
0 votes
2 answers
2k views

Direct media library upload saving in wrong month date folder in custom theme

I have an issue in my custom theme. Direct media library upload saving in wrong month date folder (2017/03) when current date is 2018/09. But when I upload images through post it goes to the correct ...
1 vote
0 answers
13 views

How to add a post page from a button without reloading

I am a novice in developpement and I am trying to create a page. When I click on the button Gutemberg, it will generate a post page with a text and an image. The problem is that the page is created ...
0 votes
1 answer
905 views

Only current gallery images with get_attached_media

On my page the gallery images are cycled and I would like to show their title as a caption. Since get_post_gallery_images only retrieves the thumbnail-url of the gallery images I have tried to use ...
0 votes
1 answer
742 views

Import media in bulk with caption and titles?

I am converting a non-WP site to a new WP site. The old site has about 500 images that I need to import to the media library in bulk, and I need it to include the captions and titles. Is there an ...
0 votes
1 answer
3k views

Get all uploaded images using REST api

I need to get all the images that are uploaded in my wordpress installation using the REST API. I've tried using the wp-json/wp/v2/media endpoint but it will give me only the last 10 images uploaded ...
4 votes
2 answers
2k views

Restrict file types in the uploader of a wp.media frame

When creating a wp.media frame in JS, is it possible to specify allowed file types for the uploads tab? wp.media({ title: 'Pick a PDF', button: { text: 'Use this file...' }, ...
1 vote
2 answers
84 views

Front end form with images and media_handle_upload logic?

I'm building a front-end form with image submissions. The form creates then a new post: ...process post... $application_id = wp_insert_post($application); I then use media_handle_upload to upload ...
1 vote
2 answers
787 views

Wordpress uploads autocreate folder every month

In start of every month WP creating folder with month number, like /uploads/2019/11, and it's creating with ROOT, so I dont have permission to write it. If I delete it, and then it's creating when I ...
0 votes
1 answer
40 views

'Add Media' to post - filter images

Can anyone help me with this? ... I am trying to locate and understand the javascript and/or php/ajax code that filters the thumbnails that show in the interface when a user clicks "Add media&...
1 vote
2 answers
240 views

Switch between tabs on "Insert Media" dialog

I'm writing a file upload plugin and want to emulate original Wordpress behavior: user uploads file on "Upload Files" tab after upload is complete, "Media Library" tab is activated with just uploaded ...
12 votes
3 answers
3k views

How to trigger a refresh in the media modal

I'm developing a plugin that adds a new tab to the media modal, and I need to know a way trigger a refresh of the attachments tab so it shows newly added attachments. This is the code I'm using: wp....
0 votes
2 answers
1k views

how can I change all wordpress media file url to custom cdn url?

any function can apply change all image URLs to CDN instead of modifying media.php in wp-includes folder ?
0 votes
2 answers
242 views

How can I get the Media Library backend to show larger thumbnails?

I have a pretty simple need. On the admin screens, my media gallery is reducing my picture thumbnails to about 145x145 so they'll fit in 6 columns across the screen. The only way I can get a good look ...
0 votes
2 answers
2k views

Hook into backbone to add js to wp-admin -> media library?

I've enqueued a .js file on the "Media Library" page (upload.php). I need to hide and manipulate a few of the thumbnails on the page using JS only ( I'm not looking for workarounds ). The elements ...
3 votes
1 answer
356 views

How do I display a PDF thumbnail as a link to the PDF without uploading the image

When I found a couple of years ago that WordPress will create thumbnails of uploaded PDFs, I was so happy, thinking I wouldn't have to make and upload separate PDF cover images to have a thumbnail ...
0 votes
0 answers
11 views

How to make the search form in "Add media" search custom attachment fields?

I've added custom fields to image attachments on my site, something like this: function mysite_attachment_field_to_edit( $form_fields, $post ){ $form_fields['my_ref'] = array( 'value' =>...
0 votes
1 answer
828 views

Bulk Attach Or Insert Media To Post Without Opening Post Editor

How to create a custom panel inside wp admin dashboard where we can insert media to specified posts in bulk? Here is the illustration: As shown on the image above, it list all available media on the ...

1
2 3 4 5
22