An image, audio or a video comprises a media.

learn more… | top users | synonyms

3
votes
0answers
147 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....
3
votes
0answers
475 views

Extend Media Library

The Media Library in WordPress has "Insert from URL" link to the left. It accepts image URLs. It's not said anywhere but if you paste YouTube URL or <iframe> code then it will insert it too. It ...
3
votes
0answers
71 views

Proper way to add a button to the top menu of the media library?

I want to add a simple button to the Media Library top menu (say, to the right of the bulk actions / filters dropdowns. I have scoured the WordPress codex for a proper way to do this and have found ...
3
votes
0answers
729 views

Customizing the 3.5 “Add Media” popup (Backbone.js)

Here's yet another question in regard to the new(ish) 3.5 "Add Media" popup and how to customize it! What I'm trying to do I'm attempting to do four main things: 1) Create a custom tab titled "...
2
votes
0answers
89 views

Media upload via backend doen't work after moving site

I have copied my site to a subdirectory for test purposes, everything works fine now. The only problem I have seen so far is the Media upload. When I try to upload a file I get a: Unable to create ...
2
votes
0answers
405 views

Saving data-URI to media library

I have a TinyMCE plugin that generates PNG images using HTMLCanvasElement.toDataURL() (MDN). Currently, I'm just displaying them on the backend by putting the data-URI in an image tag, but I'd really ...
2
votes
0answers
52 views

Category checkboxes in upload modal

In a project I'm working on, I've enabled categories for attachments using: register_taxonomy_for_object_type('category', 'attachment'); In the edit attachment screen in the Media Library you see ...
1
vote
0answers
13 views

Allow downloading unusual file types

I am trying to make .dwg and .rfa files downloadable on a Wordpress site. I've added the following code to allow them to be uploaded through the media browser: function additional_mime_types($...
1
vote
0answers
23 views

Add custom tab on the media manager

I want to add a new tab and its content on the media manager. I have used add_filter('media_upload_tabs', 'mime_type_tab' , 1 , 1 ); but that filter it is not working on the featured image pop up.
1
vote
0answers
19 views

Edit image results in copies of file being created

I am encountering what appears to be a file duplication issue when using the "Edit image" function. In this case specifically I am cropping the image but any edit process should have the same effect. ...
1
vote
0answers
33 views

WP Media uploader loading only once in options page

A weird issue happening with me which I am unable to fix. In my theme options page, I added options to upload images one for logo and another for backgroud image. Here is my HTML <table class="...
1
vote
0answers
47 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 ...
1
vote
0answers
329 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 ...
1
vote
0answers
74 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 ) { $...
1
vote
0answers
24 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 ...
1
vote
0answers
134 views

Media Library empty after server move (exact copy of files and db's)

After exactly copying both all the files and the database of a site over from an old server to a new one with the same URL (granted, DNS has not been switched over yet but not sure if that has any ...
1
vote
0answers
162 views

How to delete uploads not in media library?

How to delete uploads not in media library? I have lot of images in my uploads folder but doesn't in media library. Exist some method how this do it?
1
vote
0answers
69 views

How can you change all past posts' images to link to none instead of the image file?

I'm working with a new client who has a ton of existing posts. She has a lot of inline images and for some reason they all link to the image files. I know how to change this for future posts by adding ...
1
vote
0answers
57 views

wp.media add context

I have wp.media frame on my plugin to upload doc, docx file. I am filtering the uploaded file. If uploaded other than supported file, it will display this error I am filtering it at ...
1
vote
0answers
32 views

Add fields to the WordPress media uploader

I am trying to add an URL field to the WordPress media uploader using following code: /** * Add an URL field to gallery attachments * * @param $form_fields array, fields to include in attachment ...
1
vote
0answers
87 views

How to allow logged out users to upload media?

How do i allow non logged in users access to the media library for uploads? I am making an anonymous blog, i got posting with images to work, but i need the media button above the editor to work so ...
1
vote
0answers
71 views

Automatically attach image to post if they have the same title

I have 200 images in my WP install. Currently, each image... has its own post (the post title is the same as the image title) is the featured image of that post is inserted into the post However,...
1
vote
0answers
666 views

Custom media picker in meta box: how to select available image sizes?

I have a custom meta box where a user can select an image and save it using wordpresses media picker, set up with some JavaScript. That works fine, but I'd like the option to select which version of ...
1
vote
0answers
58 views

Limit filetype and wp media

This is my input markup: <div class="button-primary" id="fileToUpload">Upload</div> This is js: jQuery( '#fileToUpload' ).click( function() { var custom_uploader = wp.media ({ ...
1
vote
0answers
147 views

WordPress media uploader - upload tabs not hiding

I'm in the process of adding a front-end post editor to one of my sites. In doing so, I need to prevent certain users from being able to upload media. I have things "kind of" working but there are a ...
1
vote
0answers
96 views

Images uploaded to the media library has strange colors. However, in the edit screen the color is ok

This is a strange issue that I've never encountered before. When I upload this image to WordPress' media library, it comes out like this (image on the left): This is also how the image appears on ...
1
vote
0answers
19 views

How to get the last selected media alignment setting?

The default media uploader for inserting into a post retrieves the last selected alignment setting that was used. How do I retrieve that for use in my plugin?
1
vote
0answers
308 views

Modify how gallery.js builds the shortcode [gallery …] in tinyMCE?

The post editor helpfully removes default arguments like columns="3" from the [gallery] shortcode. How do you tell it to remove a custom attribute that has a default value? The answer at Enhance ...
1
vote
0answers
195 views

How to run custom JavaScript code on gallery attachment image selection

On line 4620 of media.views.js is this: media.view.Attachment = media.View.extend({ ..... select: function( model, collection ) { ..... I would like to add some more features to this "...
1
vote
0answers
303 views

Images are registered in media library but still won't show up

I'm working on creating a copy of a wordpress site on a separate domain hosted on the same server as the original. I created the new database with the correct domain and everything is working properly ...
1
vote
0answers
203 views

How to make a customized “Create Gallery” tab in the 'Add Media' window?

I'm developing a plug-in and wanting to make a customized version of the the "Create Gallery" tab of WP v4.0, but have the resulting output (i.e. what gets inserted into the TinyMCE editor) to be ...
1
vote
0answers
199 views

How do I get around “Sorry, this file type is not permitted for security reasons”?

I was wondering how I could allow .tiff files to be uploaded in my wordpress site. I get the message "Sorry this file type is not permitted for security reasons". This question has been asked in ...
1
vote
0answers
182 views

Blank upload.php page

I am wanting to optimize the images that I have previously installed on my Wordpress site. I haven't uploaded any images for a while but now when I try to access the Media Library (Media > Library) ...
1
vote
0answers
46 views

Post and featured image have the same name, why is the attachment (image) is showing and not the post?

How do I get the actual POST to display - and not the thumbnail of the image? I have tried to redirect the attachment to the parent post, but that gets caught in a redirect loop. For an example - ...
1
vote
0answers
28 views

Attach media to post by media category

I am attaching a media category to a uploaded media. When I am saving changes I'd like to automaticaly attach that media to post which name is the same as the media category. Has anyone done something ...
1
vote
0answers
122 views

Custom RSS Feeds & Post Meta Data

Rss feeds normally display media files along with post excerpts. I am using post meta to add media files to a post. Unfortunately, since the audio file is not being inserted into the main textarea the ...
1
vote
0answers
60 views

Retrieving Meta from Image Attachment

I currently have added a meta box to the media library popup using the following: // ADD CUSTOM INFO INSIDE THE MEDIA LIBRARY function AddLibraryFields( $form_fields, $post ) { $Added_META=...
1
vote
0answers
371 views

Media attachment pages giving 404's

I use Google Webmaster Tools to track and fix 404's. I've been getting numerous 404's from media attachment pages, but not the page itself, it's parent. An example: I have this piece of media, http:/...
1
vote
0answers
234 views

Export xml use/import images from theme directory

Is it possible to create demo.xml for a theme that when imported into fresh theme installation will use/import images from theme directory folder (e.g. theme/images/demo) rather than import media from ...
1
vote
0answers
120 views

Custom media uploader not showing library

i am developing a plugin that allows upload an image. Actually the plugin works fine it means, that if you upload an image, the image get set in the database, but, not show the images on the library, ...
1
vote
0answers
472 views

Bulk edit of EXIF data for jpeg images uploaded in the media library?

Although there's a number of plugins that display EXIF data in your posts or remove EXIF data altogether to save space, I couldn't find a solution to manually edit EXIF data for whole bunches of ...
1
vote
0answers
61 views

Importing 10 Years of Media into the WP Database

I've been running the same website for 10 years now, and whenever I would create a news story, I would manually upload and store all my news images in a "news" folder via FTP and then manually write ...
1
vote
0answers
493 views

Upload video in custom folder

I am trying to find a system to upload some kind of media in a custom folder. I want to keep all uploads in default wordpress folder and create a custom folder just for videos. So i would have the ...
1
vote
0answers
673 views

Extending wp.media.model, query media from different blog on network and refresh view

I'm trying to extend the new wp.media.model to allow users to be able to choose any blog across the network and pull down the associated media library into the library content view. In the old ...
1
vote
0answers
93 views

Custom links or pages from Media Gallery

I have a simple Wordpress Media Gallery running on a page and every time you click an image it takes you to the attachment page. This is fine as I can write an article in the description and that page ...
0
votes
0answers
33 views

wp-admin/post.php access denied

When I publish or update posts with media (eg: image ) it results to following message. Access Denied You don't have permission to access "http://example.com/wp-admin/post.php" on this server....
0
votes
0answers
15 views

Any way to use media (uploads) from one site in a new site?

I've had a wordpress site for a few years. Now I'm starting a new site (in a different language) which will use many of the same images from the old site. I don't want to duplicate media, as server ...
0
votes
0answers
22 views

How to upload thousands of images with folder tree?

Hi We need to upload meda from FTP and when choose image from add media there show foder tree for choose media. See the attached screenshot.
0
votes
0answers
9 views

Using a separate image server with WP

I'm interested in figuring out how to use a public image server instead of Wordpress' root image directory for managing media on a new Wordpress site. Background: Client currently runs a blog with ...
0
votes
0answers
13 views

Trying to get the link to the media file image attachment to display in a lightbox

Tried many variations including wp_list_pluck with no luck. Not sure how to proceed. <?php $attachments = get_children( array( 'post_parent' => get_the_ID(), // $pageChild->ID, $post->...