Questions tagged [media]

An image, audio or a video comprises a media.

Filter by
Sorted by
Tagged with
0 votes
5 answers
7k 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
1k views

Fullscreen Video/GIF Intro

How would one go about placing a 3 second Fullscreen Video/GIF Intro upon website start up as a preloader. I've tried coding it in but there's always something conflicting and limits the ...
0 votes
1 answer
1k 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
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
0 answers
7 views

image block select modal > custom tab on the media modal with filtered media and allow select media

I want to do a plugin to mark some media files as Favorite and then the favorite media marked allow be displayed on the Select image modal that is showed when a user try to add or replace an image via ...
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
817 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

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
2 answers
474 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
0 answers
9 views

My images aren't loading after adding update_option('upload_url_path', '')

I tried using update_option('upload_url_path', '/product_large') to change the url of my images. After updating the functions.php my images aren't loading in my site. Any possible solution? Thanks!
3 votes
1 answer
1k 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...' }, ...
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 ...
1 vote
1 answer
655 views

Custom dropdown field added to media gallery; how to get it to save properly?

I am using the following code to add a couple of custom fields to media attachments: //Add custom fields for attachments function kgal_add_custom_fields_to_artwork( $form_fields, $post ) { $...
0 votes
1 answer
762 views

Is there a way to make my media files unsearchable?

I upload a lot of contracts, T&Cs, pdfs and audio file to my wordpress blog. I would like all of this content to be hidden from standard search engines. Is this possible?
2 votes
3 answers
817 views

How to automatically convert images to WebP on WordPress?

I want to convert every PNG and JPEG to WebP on upload so that I can serve WebP and PNG/JPEG without requiring the user to upload a WebP version of every photo. I want to save the WebP in the same ...
0 votes
0 answers
28 views

Optimize blog that serves hundred of images and videos

We have a website that contains 20,000+ media. It serves images and videos per post(500 post as of now). Opening posts takes a very long time to open because it contains images(500+) and videos(50+). ...
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 ...
0 votes
0 answers
12 views

Add to Media Inserter Categories

As of Wordpress 6.2, Openverse was integrated into wordpress and it is available under the Media Tab of the Inserter. I want to develop a plugin that integrates another stock image service into the ...
1 vote
2 answers
879 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
0 answers
44 views

Add custom css class to wp-list-table row for Media Screen

How to add class to the row of WP List Table in Media List page like the following. Add custom css class to wp-list-table row for custom post type Thanks
1 vote
1 answer
846 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
0 answers
46 views

Uploading media to wordpress API with C# HttpClient

I was trying to save some media but I can't get it to work. I don't know if its the authorization is the wrong format, or if its the content is just put in wrong. If someone knows how to please help ...
1 vote
1 answer
61 views

wp media regenerate says "no regeneration needed" whe that's no the case

I'm trying to generate thumbnails for a PDF attachment. Right now in the uploads/ folder there is only the PDF file, no image thumbnails related to it. But when I run the regeneration with : wp media ...
4 votes
1 answer
2k views

wp_editor with media buttons

I use wp_editor() on the frontend. media_buttons are displayed on default if visitor is logged in. I want to display these media buttons whether user is logged in or not. Is there any way to achieve ...
0 votes
2 answers
107 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 ...
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
2 answers
683 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
1 answer
625 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
1k 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
1 answer
626 views

Active Directory and group permissions

I'm trying to modify WordPress to have the following features: Users are created in Active Directory and assigned to groups. Users can login to WordPress via Active Directory. Pages can be locked ...
0 votes
1 answer
640 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
1k 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 ...
0 votes
1 answer
17 views

Does WordPress import export tool keeps the file hosted on the old website?

I have an old website with several GBs of media data. i want to export the media files with wordpress export / import tool to my new website. Wordpress gives me a 10mb .xml file out of the several GBs ...
0 votes
1 answer
625 views

How do I secure a subdomain using UCC SSL?

I have a UCC SSL Certificate installed on my primary domain (example.com). I have 3 subdomains listed as Subject Alternative Names (SANs) (shop.example.com, distributors.example.com and careers....
1 vote
2 answers
649 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 ...
1 vote
1 answer
739 views

Media library quick/inline edit

Posts and pages offers the opportunity for inline editing (Quick Edit), i.e like this. It is also possible for custom post types, but for some reason this is not offered for attachments/the media ...
0 votes
1 answer
831 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
0 answers
10 views

Close featured image modal windows with JS

I'm developing a plugin which let you select a fectured image for a post from an external resource e.g. an API When I select an image, I want the image select window to close. I have tried with: wp....
0 votes
2 answers
322 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 ...
0 votes
1 answer
68 views

What is the proper use of guid for images in wp_posts?

I understand that guid is a unique reference for a post, whether that post is a post or an attachment. When it's a post, I think guid is self-evident. But what is the correct formulation/destination ...
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 ...
0 votes
1 answer
768 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 ...
0 votes
2 answers
2k views

ACF Gallery with Media Categories - how do display categories and sort

I would like to use something to filter images within an ACF Gallery. I have added the Enhanced Media Gallery Plugin which will allow me to assign a category to each image, but am not not clear on how ...
0 votes
0 answers
25 views

upload image to wordpress media library failed for custom post type

image upload failed. I tried to upload gym logo as thumbnail image for gym post type. All the form elements are working. But image upload is not working. images are not appearing in WordPress media ...
0 votes
1 answer
1k views

How to load mediaelement.js in theme template?

I'm developing a video oriented theme. I need to include native WordPress video player in my page template. This is what I'm doing: $video url comes from a custom field. It outputs the video file url ...
0 votes
0 answers
48 views

How to properly move media files and update data?

Bashing my head against a wall here. I want to write a function that moves the actual file of a Media Library attachment, but this must necessarily update all metadata. I am already doing a foreach on ...
0 votes
2 answers
2k views

Newly uploaded images are not updating in featured image

Using the google page speed test i saw that some images were too large and needed to be resized. I used the ftp to download the necessary images, resized them locally, and then used the media upload ...
0 votes
0 answers
50 views

Looking for a way to insert PDF image preview in TinyMCE

We're still using TinyMCE as our post editor. When Editors use the 'Add Media' button to select a PDF from the Media Library, they choose the thumbnail or medium size image from the Attachment Display ...
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
3 answers
938 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 ...

1
2 3 4 5
22