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]

An image, audio or a video comprises a media.

0
votes
2answers
12 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
0answers
14 views

How to upload 3 attachments to current post?

I have a form which updates a post but when updating I need to be able to also upload 3 posts: <div class="form-group"> <input class="form-control" type="file" tabindex="3" name="custom-...
0
votes
0answers
12 views

How can I change a media attachment URL/slug, so that I can use that slug for a page?

As in the title. Yoast is now installed so that all media page URLs redirect to the image itself, but how can I change that slug for the image? It's currently using the slug I'd like to use for a ...
0
votes
0answers
4 views

Wordpress Media Permalink Patterns

Is the any way to change the Media permalink patterns for all future uploads? For instance, if I upload an image titled "Contact", the media permalink will be: example.com/contact I can't for the ...
1
vote
0answers
16 views

Limit number of images to upload in wp.media function

I need to edit a plugin for my website. The plugin uses wp.media function and lets user upload images from the frontend. A user should be able to upload multiple images. But, I need to set limit on ...
0
votes
1answer
16 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
0answers
17 views

Azure WordPress Media Library HTTP Error

I have Azure WordPress installed, the media library's fileupload size was 8MB which I had to increase it to something larger. I brought the changes in the .user.ini file and .htaccess file. .user.ini ...
0
votes
1answer
13 views

Sanitizing existing media library paths and page links from foreign characters

I'm migrating an old WP site that supported Swedish letters ÅÄÖ in the URL, thus the site has hundrets of images containing these letters. I've searched around and found various plugins that sanitize ...
1
vote
1answer
33 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
0answers
10 views

When trying to add image to media library it errors

I get an error when trying to add an image to the image-library. However, the file does successfully store in uploads but I think it creates a bad record in the associated table (no not know whether ...
0
votes
0answers
13 views

Making media library files private

Is there a way to make the media library private. For instance, if someone were to type http://websitename.com/test-file/ That person would have access to a private file. I want to be able to set user ...
1
vote
1answer
16 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
0answers
25 views

can't skip forward vidos in most browsers

I have two wordpress sites in separate folders on hosting. On one of them video plays fine, so it is not a server problem. Second site cannot navigate(rewind) back/forward all videos. Video playback ...
0
votes
0answers
63 views

Uploading media to WordPress gives an error occurred in the upload. Please try again later after chagning host

I Recently changed web host and I realized that uploading images gives the error "An error occurred in the upload. Please try again later." (because I turned on debug mode. Normally the error was "...
0
votes
0answers
20 views

Remove [gallery] shortcode and print html

When create new gallery from "Create Gallery" in Media into a plugin I need remove the shortcode [gallery ids="...,..."] that it print after loading and selecting photo action in text editor with a ...
0
votes
0answers
15 views

Wordpress Search across media files

How can i extend the wordpress default front-end Search to search across audio file titles/captions as well?
0
votes
0answers
33 views

wp_delete_attachment doesn't delete image files / doesn't work

wp_delete_attachment should delete everything that is about attachment. However if I do wp_delete_attachment( (int)$delete_attachment_id, true ); The files remain on the server (even true should ...
0
votes
0answers
10 views

Add a option to select in Media Library to personalize how items are showed

Is that possible? I found that media-view.js creates a query and has six base type of queries based on items field in select element on the upload.php page. I saw that the scripts come from load-...
0
votes
0answers
19 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 ...
0
votes
0answers
17 views

Capture mediaelement events

I'm trying to capture a couple of media element player events to no avail. There's a great API list of events available, but little documentation on how to implement. No examples. Here's what I've ...
1
vote
2answers
103 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
1answer
16 views

Setting an image as post header (not featured image)

I am not a WordPress expert and need your support. Is there a way to create a button just like Set featured image but that button will allow us to attach an image to a post (from gallery) as a meta ...
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 ...
0
votes
0answers
18 views

In a sub-directory installation, how to serve media content from main directory?

I have moved WordPress to a subdirectory www.site.com/SUBDIR Media files are stored on www.site.com/SUBDIR/wp-content/uploads/... In WP-settings, WordPress Address (URL) is www.site.com/SUBDIR and ...
0
votes
0answers
10 views

Restrict both media library and media attachment page per user login

I am attempting to implement a solution that allows (1) users to have truly private files and (2) lets admin see all files. Many of the solutions that exist only restrict media on the backend, but if ...
0
votes
0answers
17 views

How check event jquery wp.media image selected before when click change image post?

I used to function : var selection = wp.media.frame.state().get( "selection" ); selection.on( "selection:single", function () { }); But i only work when i chang select image. It conslo.log ...
0
votes
2answers
40 views

Generate links on all images in posts - is there a hook?

I am looking for a way to replace all links on images. Currently when a user clicks an image it links to the source file. What I want it to do is to ink to: example.com/editor=12&image=filename....
0
votes
0answers
7 views

Force user to position and zoom image within a fixed frame when uploading to media library

I am looking to have an image editor similar to that provided by this Plugin https://wordpress.org/plugins/digiwidgets-image-editor/ but integrated into the core media library in Admin. For example ...
0
votes
0answers
27 views

How to add music files directly in a wordpress post?

I am creating a music album website using WordPress. I tried many plugins for creating albums and I didn't like the way they work. All the plugins I tried were same, first, create an album using the ...
0
votes
1answer
21 views

Is there some way to find if media items are used anywhere on the site?

We have a large, old site that has long gone without care and attention, leading us to have several thousand media items, stretching back to 2014. While being tasked to clear up old media items, in ...
0
votes
1answer
21 views

How to bulk Edit Dates in Media Library?

I can't seem to find this option, but is there a way to bulk edit the dates of media items? I'm trying to go through my media and clean it up and I'd like to batch edit the dates of images (they'd be ...
0
votes
2answers
60 views

Getting alt text of featured image

I'm trying to get the alt text of our featured image and have it output on the frontend. Currently my code is <img class="vehicle-photo" src="<?php echo the_post_thumbnail_url() ?>" alt="&...
0
votes
0answers
32 views

How to Show Media Library Options on front end

This Back end This Front End You can see the Crop Image option is not visible on front end library section i want that crop button available on front end too. ( using mannual crop plugin for that ...
0
votes
0answers
9 views

Customize media uploader by user role

I am having a media uploader like below. I want to remove the sidebar on the left so that only portion below the visible. It can be done with css but i hoping that that there is some better way to ...
0
votes
0answers
28 views

Get Avatar Url Weird Result and Parse Avatar URL From get_avatar() Not Working

simple task here. I need to get the url of my user's avatar so I can use it as a background-image. I tried get_avatar_url() but it oddly always gave me the wrong url, going to a gravatar domain. I ...
0
votes
0answers
43 views

How to fix this function?

I want my WordPress and Woocoomerce auto permanently delete media attachment when the image have been delete on the post and update. I refer to this page Delete post with all files attached to it ...
0
votes
1answer
9 views

Media uploads error

I am very new to this and just created my site yesterday. Suddenly I can’t upload any photos and an error is being displayed ‘An error occurred in the upload. Please try again later’. I saw a ...
0
votes
0answers
13 views

Add Media Dialog In WordPress Post Screen Too Confusing For My Users

How can I edit the contents of the Add Media box (shown above) in the WordPress post screen? All these options are unnecessary for my users, and I need to edit the short-codes as well, but it needs ...
0
votes
1answer
18 views

How to change the text of the “You are about to permanently delete these items…” alert message when deleting media from the media library?

This alert shows when you click Delete Permanently on a media (attachment) item. My Goal: I want to change the text of the alert if the current user has a certain custom meta value. Also, changing ...
1
vote
0answers
32 views

add media button is not working

Since last week I am experiencing that I am unable to add media to a portfolio item in the Parameters and Options field. When I click the button, nothing happens. When installing the theme on a sub-...
1
vote
0answers
12 views

Extend & Search Native WordPress Image Galleries With Tags and Taxonomies?

How can I tag, taxonomize and search native media? I believe my obstacle is my failure to think "the WordPress way". Building my own plugin or theme code, I am looking to achieve the following ...
0
votes
0answers
148 views

WordPress and Cloudconvert

I'm a very basic WordPress user (I can handle some basic programming) wanting to create a website where people can just go in and upload a file to convert it to something else i.e. word to PDF. After ...
0
votes
1answer
65 views

Importing existing s3 Media into WP

I'm just beginning to learn my way around WP development, having just taken over development of an old non-WP site that had 1000s of media (mostly audio) files stored on S3. For new uploads I was ...
0
votes
1answer
28 views

Can you limit the size of media files being uploaded not using php.ini?

Im facing a problem, we've got several clients who really don't care about what size images they upload but then come to use later in time to ask why the site is slow. So as a solution I would want ...
0
votes
1answer
252 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
0answers
85 views

How to move medielement scripts to footer?

This seems like a new thing since 4.9 https://make.wordpress.org/core/2017/10/30/mediaelement-upgrades-in-wordpress-4-9/ In previous versions medielement and dependencies were all loading in footer ...
0
votes
0answers
16 views

WordPress Media Uploader set library

I am trying to reuse WordPress Media Uploader and I need to change library. I have looked into the console and this option seems to be under: uploader.options.library.type however setting this does ...
0
votes
1answer
255 views

Uploading dwg files to wordpress

I'm trying to upload files with dwg extension to media but when I do that I get an error telling me that uploading files with this extension is not allowed. I tried to upload them via ftp but I cannot ...
1
vote
3answers
43 views

HTTP Error when uploading files above 7mb unless using GD Image Editor

I noticed recently that when uploading files larger than 7mb to a Wordpress site that I developed, I get an HTTP Error. I've checked some of my PHP variables, and have verified that memory_limit is ...
0
votes
0answers
17 views

Wordpress limit already uploaded files access by capability

For quite some time now, I've been developing themes from scratch to private clients using wordpress, some woocommerce, etc. Now, I can't figure out how can one protect already uploaded files by ...