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

An image, audio or a video comprises a media.

0
votes
0answers
18 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
23 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
16 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
13 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
9 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
8 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
14 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
63 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
14 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
16 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
7 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
10 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
39 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
26 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
11 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
28 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
24 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
19 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
41 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
15 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
28 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
10 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
144 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
36 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
26 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
138 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
61 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
140 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
36 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 ...
0
votes
0answers
160 views

How to upload multiple images using WP rest API to media?

I'm using JWT Authentication for WP REST API plugin and WP REST API Controller plugin Take this rest api for example, it's an api for this post, and here's the media I understand everything about ...
0
votes
0answers
31 views

Issue with upload.php with media

I'm having trouble uploading any images, files etc... on to the CMS. When visiting the Media Library the loading spinner will just constantly load without anything being loaded up. When I do it just ...
3
votes
1answer
83 views

media_handle_upload for local files?

I am creating an image on the server and storing it in a tmp folder. I would like to run a php file that takes this image, stores it in the default media directory structure and attaches it to a post ...
0
votes
0answers
78 views

Frontend Media Upload throws TypeError mediaelementplayer

I am trying to add a media upload button on frontend. Here is my code that enqueues media and my script file function pc_scripts() { wp_enqueue_media(); wp_enqueue_script( 'pc_custom', ...
1
vote
0answers
68 views

wrong media url in wordpress

Having the weirdest issue in a clean Wordpress installation. The media urls are being written with "hhttp" instead of "http". so, for example: http://dev.mysite.com/wp-content/uploads/... would ...
1
vote
2answers
34 views

Select image sizes you want to be uploaded

Would it be possible to be able to select the image sizes you want to be uploaded when you upload an image? E.g., I have these image sizes: // Set Media Sizes set_post_thumbnail_size( 864, ...
0
votes
0answers
388 views

Image upload to media library fails. Folder won't create, database insert fail, XAMPP Windows

Environment: The WordPress site is on my local laptop, 4.9.6. Windows 10, XAMPP installation, PHP 7. The procedure works fine on the remote production server with LAMP. Problem: I'm trying to upload ...
0
votes
1answer
32 views

Attaching an upload to a user

Is there any way with WordPress that a user could upload a file (pdf or jpg, for example) and have that image 'attached' to their account? Ultimately, I'd like to be able to have a Gravity Forms ...
1
vote
1answer
34 views

Rest API rename media

I've been able to upload images using the REST API but the names are wrong right now and I was thinking to go through all of the products I have and rename the images. Since I have more than 500 ...
0
votes
0answers
14 views

Applying “Organize uploads into month and year” after they have been put into one folder

So I made the mistake, a long time ago on a old site, to NOT organize uploads into month and year. I now have 50k+ files in the same folder and it is causing big problems. Is there any way to sort ...
0
votes
0answers
32 views

modify wordpress caption shortcode

I need to modify the Caption shortcode so that it renders the caption wrapper regardless if there is any caption text present. I've modified my Media content type with a custom field called Credit. ...
0
votes
0answers
10 views

How do I allow users to download file types other than official iana mime types?

I would like my users to be able to download a non-standard file type, in this case a civ5 map file. I see posts about adding iana-approved file types by editing function.php to add mime_types, but am ...