An image, audio or a video comprises a media.

learn more… | top users | synonyms

0
votes
0answers
17 views

Is it possible to set image-size for wp.media?

Working with wp.media for a custom media uploader on the front end, I noticed the media fetched is in the large image size (1200x900) and it is an overkill. I only need them in small image size ...
0
votes
0answers
12 views

Different images in media while selecting different laguages

I have simple WordPress 4.3.2 site with Polylang plugin and Twenty Twelve theme. I found strange relation between images in Media and selected language. When I swich between languages while staying in ...
0
votes
0answers
64 views

How to open the Attachment Editor frame in the WordPress media modal?

I am building a plugin that uses wp.media to launch a modal where the user can select multiple images to add to a gallery. There are many tutorials that explain this process and I managed to ...
0
votes
0answers
14 views

Run script when media uploader is opened in post

I've added additional fields to attachment fields so that the user can select a photographer either from a dropdown that has a list of photographers, or you can put your own photographer. For that ...
0
votes
2answers
43 views

Don't show avatars in media library

I am letting users upload avatars which are stored within the uploads folder inside the avatars subfolder which I created. The problem is that avatars are now listed in the media library among other ...
1
vote
1answer
16 views

Deleting images from gallery remain as attachment

Process creating a gallery: I create a post with post format gallery I add images from "Add media", note I don't use "Create gallery" but insert pictures into the post update then I have a php ...
0
votes
1answer
123 views

Organizing the Media Library for Cleanup

I am an avid WordPress(.org version) user, and I just got tasked with the job or sorting/deleting 502 items from the Media Library. I want to find all of the documents (they are PDF, Word, PPT, etc. ...
0
votes
1answer
53 views

Detect Featured Image remove while editing post in wp-admin (client-side)

I'm looking to add some client-side (JavaScript) events to the post edit screen of wp-admin (post.php?action=edit). I wish to fire events when the user selects a new featured image and a different ...
1
vote
1answer
46 views

How can I make sure attachment pages require a base url?

If I upload an image with the filename 8.jpg then the permalink becomes http://www.example.com/8 -- which I really don't want. How can I make attachments use their mime type as a base for the url? ...
0
votes
1answer
23 views

Save Custom Meta Value on Media Upload

I am looking for an option where a custom meta value will be saved when user uploads an attachment. Lets say I need a meta key _example_meta_key and want to save meta value of this as ex087659bh (It ...
4
votes
2answers
117 views

get total number of images from media using xml-rpc

I have large number of images in media library so I am accessing images in chunks via pagination in my Ruby on Rails application. I pass page number and offset to wp.getMediaLibrary API and it returns ...
0
votes
0answers
32 views

Add image class using a <select> input in media upload window & send to editor

I need to add the bootstrap "img-responsive" class via the media upload pop up. When users click the Add Media button, selects and image, there is an extra input select field below the description. ...
3
votes
1answer
123 views

Is is possible to crop an image after uploading

I'm trying to build a plugin, and part of it requires to upload (or choose an already uploaded one) an image, and when it's done uploading to crop it (a bit like how you change a header image in the ...
1
vote
1answer
156 views

How to show all available images in WP's media library when using the Polylang plugin?

It seems that depending on which default language I've set Polylang to, all my uplaoded images are isolated so that I can only pick them when I'm editing posts in the default language. I have a lot ...
0
votes
0answers
17 views

Submitting data to options.php from category admin page

I have created a new image field in Category taxonomy page which selects image using WordPress media up loader. Now I want to save the path of image and category name in wp_options table. I have ...
0
votes
1answer
66 views

display custom media folders to wordpress media popup

I have plugin "Maxgalleria Media Library Plus" in my wordpress site, where I can organize my images in different folders.When I look via FTP, in the uploads directory there are all folders I have ...
0
votes
0answers
13 views

Post links behaving weirdly after migrating DB to Amazon

I have partially successfully migrated a local DB for a WordPress site I was working on. I imported the new DB using phpmyadmin and move the template and seems to be working fine. The only thing that ...
3
votes
1answer
724 views

Add media with WP-Rest-API v2

I need your help to upload a media image in my wordpress blog via the Wp-rest-api v2 and Oauth2 authentication. I did not find in the REST API documentation the way to send my image data (name of ...
0
votes
0answers
37 views

Add Media button for Author does not have permission error

I'm working on a front-end form plug-in and have an issue with image uploading via Add Media button. I have tested with an author account and it's giving me an error message You don't have permission ...
3
votes
1answer
50 views

Ignore a filter on the media library

As per my question yesterday, I need to exclude all images from most of my WordPress queries - yesterday, I thought I needed to exclude them from all queries, until I came upon the following issue. ...
1
vote
2answers
34 views

How to compress image before inserting to wordpress using wp_insert_attachment function?

Is it possible that when user submit multipart form for creating a new post in wordpress, all the images are inserted using wp_insert_attachment() to media library with compression so the uploading ...
0
votes
0answers
22 views

Detect when media select input field has been populated in a plugin

I have some code in a little plugin I am trying to make that allows a user to select an image to use : <input type="text" name="thumbnail_adr" id="thumbnail_adr" class="regular-text" ...
0
votes
0answers
10 views

Change URL of Media

I'm not sure if this specific question has been asked so here goes. We uploaded 50k images and all is well. We run the site through cloudflare and added a CNAME of http://i.mydomain.com which goes to ...
0
votes
1answer
25 views

limit media upload to once a day

Is there a way (with hook or plugin) to limit media upload to once a day per user? I can only find related articles about limit file size. Edit: The reason I want to use this is I'm setting up a ...
0
votes
0answers
25 views

Hooks after media is saved

Is there any hooks/filters that fires when user already uploaded image/video . Thank you
1
vote
0answers
37 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
0answers
12 views

How to limit the access of each user just to his own uploaded files Amazon S3?

In my Wordpress website Users can upload video files directly to the Amazon S3 bucket from the front-end, how to limit the access of each user just to his own uploaded files and not the other users ...
0
votes
0answers
108 views

Cannot embed YouTube videos “Failed to embed” error

I get this error on multiple WordPress sites I run, when I try paste a YouTube video or use the shortcode [embed]: This only happens with YouTube. Other media websites such as Vimeo has no problem ...
0
votes
0answers
18 views

Re-organise uploaded media

I don't know if this question has been asked before here, so here it goes. Can i re-organise uploaded media into years/months folders? Up to now i wasn't using this and now it got to the point where ...
0
votes
2answers
44 views

Find unused images?

Is there a reliable up-to-date way to find media that resides on the server but is not used in the WP site? I have found a number of plugins, but all are very old, with lots of negative comments to ...
0
votes
0answers
18 views

Save & echo Image in Input - Admin seting page

in functions i have user code create fields get image url add_action('admin_menu', 'baw_create_menu'); function baw_create_menu() { add_menu_page('PH Plugin Settings', 'PH Settings', ...
0
votes
0answers
23 views

Extra metadata for media items

I've made a plugin that allows me to create thumbnails in the media library grabbed from youtube based on a code. Ideally I would store the code as metadata with the media library item. However, I ...
0
votes
0answers
70 views

Caption description in tinyMCE editor

I posted this on the hacks forum of Wordpress a week ago but it seems no one is able to help me there. I'm currently customizing the captions for a client, and I have two separate problems that I ...
3
votes
1answer
139 views

Refresh wp.media after ajax call

I'm building a plugin where i add a tab to the media manager and can add stuff from another source. I add the tab with this, which generates a iframe; add_filter('media_upload_tabs', ...
0
votes
1answer
35 views

Customizing individual images on posts

So I'm trying to customize the output of single image in my posts, adding custom divs and classes. I found a good tutorial online here - How to wrap every image in a post with a div? The function ...
0
votes
1answer
19 views

Is there a way to get attachment data?

So, I'm no big fan of how WP stores images (image data) and I was hoping there had been made some improvements in version 4.x. But alas no. When I say image data, I mean url, title, caption, alt ...
0
votes
1answer
151 views

Wordpress media upload “HTTP error”

When I try to upload an image, I get the following error: HTTP error. I know this problem has been solved hundred times but I can't find the right answer form my configuration. In the php.ini, I ...
0
votes
0answers
306 views

Upload featured image from front end using media-upload.php

I'm trying to use admin/upload.php to upload featured image from front end form. All I have to do is put below code in the front end form <div id="postimagediv" class="postbox "> <div ...
0
votes
0answers
47 views

Change view and refresh wp.media

I'm building a plugin which adds a new media tab. In this tab i display an iframe in which i can select images from another source and upload them to wordpress (using ajax). This works just fine, the ...
0
votes
2answers
180 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 ...
3
votes
1answer
201 views

How do I detach images from posts?

Firstly I've seen some topics like this, but they haven't helped me. I've attached some images to a post via "Add Media" : And for showing these attached images, I used following code in ...
0
votes
0answers
23 views

How to properly extend WordPress media library?

I'm looking for a way/example to properly extend the WordPress Media Library. A good example of a plugin already doing this is Remote Medias Lite. I want the user to be able to select from custom ...
1
vote
0answers
52 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 ) { ...
2
votes
1answer
26 views

Disable mouse image resizing in editor

I want to disable the mouse image resizing function in wordpress standard editor. So that its not possible to resize the default image size when you select an image and pull on it. Any idea how i can ...
1
vote
0answers
23 views

Add input to the media uploader and pass its value to each uploaded file

Suppose I have a select element containing a list of my custom taxonomies or terms, I need to add it to the media library uploader so that the admin can choose the custom taxonomy to which he wants to ...
2
votes
2answers
100 views

Where do the favicons for Media Files come from

I have uploaded some PDFs to the Media Library. I cannot find a way to set the browser favicon for the PDF media files. Where does WordPress get the favicon from? Is there anyway to control the PDF ...
0
votes
0answers
62 views

Custom upload folder

I have custom post type and I would like that when admin/user uploads images (for example featured image) to this custom post type, the image would be uploaded to custom folder. As default they go ...
0
votes
1answer
20 views

get users nickname uploaded media

I want to get the users nickname who uploaded a media file. I'm getting all media files with this code and want to link to the users nickname / profile <?php $args = array( ...
0
votes
1answer
105 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
3answers
221 views

Pagination not working on static page

I am using the following code to display media files on a custom static page. Files display properly but pagination is not working. How can I solve this issue? Following code shows the media files: ...