An image, audio or a video comprises a media.

learn more… | top users | synonyms

1
vote
2answers
1k views

How to add qtranslate multi language support for media?

The multi language plugin qtranslate works for custom post types but there is no capability to translate media information like title, description, captions for images. I am using the following code ...
1
vote
0answers
30 views

Rendering the uploaded file in a wp.media object

I have seen this question asked a few times on SO and I don't see any responses. I have a wp.media object (upload dialog), that I am using in to store an upload to a post as a meta element. It works ...
1
vote
1answer
1k views

Audio and video shortcodes not working properly

I'm having some trouble with Wordpress's built-in shortcodes for audio and video. When I embed a video, it basically gives me a black box and has a link to download the file at the top; when I embed ...
0
votes
1answer
9 views

Reattach media after moving to another server

I moved WordPress from one server to another and imported everything with the standard WordPress importer. As there are a lot of posts and about 10000 images and videos, I uploaded them with FTP. ...
0
votes
0answers
26 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 ...
0
votes
0answers
9 views

How to open full Media Editor in a frame

I'm oppening media editor with this code jQuery(document).ready(function($) { var frame; var id; // Build the choose from library frame. $(document).on("click", ".upload_image_button", function() { ...
1
vote
2answers
34 views

How to get an image url from media library

I have got an attachment id, but I need an url. How can I get an url from the attachment object? // When an image is selected, run a callback. frame.on( 'select', function() { // Grab the ...
1
vote
2answers
758 views

Cropping thumbnails to specific dimensions on front end post

Probably not the best title description but here we go. One of my custom post types is for youtube videos which I take the thumb from youtube and upload it as a thumbnail for the post. Now it's easy ...
1
vote
0answers
9 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
2answers
31 views

What relationship determines which images appear in 'uploaded to post' in edit/add post media dialog

I would like to know which relationship in the database determines which images are displayed in the media dialog when you select 'images uploaded to post' as the search filter. I thought it would ...
0
votes
0answers
13 views

upload_async.php returns 500 error

When uploading a large file via the Media uploader, I get the infamous HTTP Error problem. I also have the following in the Chrome console: POST http://www.nameofsite.co/wp-admin/async-upload.php 500 ...
0
votes
1answer
405 views

How to remove “Image Information” and “post date/author” from a media page?

I'm trying to use Wordpress to setup a simple website for my business, and I'm having issues with the gallery page. Once an image is clicked and brought to it's specific page, it includes author and ...
0
votes
2answers
733 views

I want to replace a media file (pdf) with an updated version

I have an updated version of a pdf file which is linked to several pages and pending posts. I want to replace the old version with the new one and keep all the existing links. Thank Priya
0
votes
1answer
264 views

Insert media button will always add into the same tinyMCE editor

I have an issue with the insert-media button. I have 2 instances of tinyMCE with both Add Media button. When I add a media in one of the two tinyMCE, all my media will go in this after, whatever which ...
2
votes
1answer
92 views

Wordpress Media mime type filter problem 4.0

I have added new mime types with the 'post_mime_types' filter eg. PDF, doc, mp3 etc... Filtering by custom mime type on the upload.php page in media grid view works as expected but in list view it ...
0
votes
0answers
23 views

Filter media attachments by post in Media Library

Were working on a small plugin to allow attachments in the media library to be filtered by the post that they are attached to - and the basics are working: You can see the full code hosted on github ...
0
votes
1answer
276 views

Site migration - some images not displaying in Media Library

After migrating a site from the live server to my test server (different URL), some of the images (not all) are not displaying. The src is correct, image is in the uploads folder, and everything ...
0
votes
1answer
21 views

How to get the correct URL on my wordpress site?

I have an existing website, which I want to move to wordpress, while keeping the same domain name/ URL's used in the old version. So far I have installed wordpress locally, and am migrating the site ...
0
votes
1answer
1k views

Add SWF file to wordpress through custom template

I am trying to attach an swf file to my website. I have that swf file in my local system. But wordpress is not alowing me to upload the swf file into the media library. I want to add that swf to my ...
0
votes
0answers
31 views

Add custom field to edit media WP 4.0.1

I try to add a custom field for media edit from WYSIWYG. But the attachment_fields_to_edit filter does not add the field on the edit popup. When you click on a image and then click on the edit icon. ...
4
votes
1answer
553 views

wp_generate_attachment_metadata returns empty array

foreach ($_FILES as $key => $file) { $uploadedImage = wp_handle_upload($_FILES[$key], $upload_overrides); pre_r($uploadedImage); if ...
1
vote
1answer
276 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 ...
2
votes
3answers
77 views

How do I go straight to “Edit More Details” when clicking on an item in the media library?

By default, when I click on an item in the media library, it takes me to the Attachment Details page, e.g. .../wp-admin/upload.php?item=65. What would I need to edit to make it go straight to the ...
0
votes
1answer
260 views

Wordpress core responsive video not working with shortcode

I cannot get the video from Wordpress core to behave responsively. I'm using the following CSS: .videocontent { width: 100%; height: 100%; max-width: 1024px; margin: 0 auto; } ...
0
votes
1answer
269 views

Display MP3 as media using an URL from a custom field

I created custom field and placed this inside the loop: <?php echo get_post_meta($post->ID, 'ses', true); ?> But now the link is all text. I would like it to be like my theme does when I ...
-1
votes
0answers
9 views

Wordpress Images issue [closed]

I have a issue with my wordpress my all images redirecting on a specific url domain.com/wp-content/uploads/abc.jpg to domain.com"domain.com/wp-content/uploads/abc.jpg" Can someone help me figure ...
6
votes
1answer
363 views

How to make “Upload files”selected by default in Insert Media?

I am frustrated having to click on the "Upload Files" constantly instead of the first choice being Upload Files in posts editor....How can i make “Upload files” selected by default instead of "Media ...
0
votes
0answers
16 views

media_sideload_image uploads an image multiple times!

i want to upload an image programmatically into wordpress media library and then attach it to a post! i found media_sideload_image function in wordpress codex but when i use it in functions.php file, ...
1
vote
1answer
387 views

Remote upload file to server B

I'm aware this might be some of the hardest coding to do ever, but thought of giving it a try. Im basically trying to detect all (mp3) filetypes uploaded through the Wordpress media upload and send ...
0
votes
1answer
35 views

Update media file url in wordpress media library

Currently my videos are hosted within my wp installation. I want to move all videos to my new server. Currently, my media url are as follows http://mysite.com/wp-content/uploads/video01.mp4 I am ...
0
votes
1answer
451 views

Site not getting correct featured image from my query

On the home page of my site I have a series of tiles that link to various parts of the site. One tile links to the blog and I have written some code to pull the latest post with an image attached to ...
1
vote
0answers
16 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?
0
votes
1answer
30 views

Post Type Upload Directory - {post_type}_upload_dir filter

I'm working with modifying the upload directory depending on which post type is being uploaded to. I've ran across this question: Post type specific upload folder in 3.5 and one of the lines confused ...
0
votes
0answers
113 views

Media Player gone on front end

This seems to have happened since the WordPress 4.0 upgrade (I think). When I use the "Add Media" button for an audio file, I can see the player in the WP backend, and it functions. But it doesn't ...
1
vote
1answer
36 views

Change wp-content/uploads to uploads/%postname%/%image%

When uploading an image to a post, I want to change it so that it grabs the postname or post_id and places it in a folder like uploads/%postname%/ Is there a simple method of doing so? thanks
0
votes
0answers
55 views

Wordpress media library (in GRID VIEW only) is not showing thumbnails

I am using a bit of code, that deletes the unneccessary full images after uploading and adding different sizes and then sets custom sizes. The crazy thing is, the other media gallery view is working ...
1
vote
1answer
51 views

Customizing default Mediaelement player

Good morning/afternoon everyone. Been playing around with the default wordpress mediaelement player and definitely loving it. I managed to customize the layout a little by overriding some css values ...
0
votes
1answer
22 views

Elegant way to signify inheritance and relationship between posts

Let's say I have a weekly podcast, that I use WordPress as my CMS, and that I use LibSyn to host my media. This podcast is one hour long, and includes several "special" content segments that I also ...
3
votes
3answers
3k views

Settings in 'Media > Settings' is ignored when inserting images

When I upload an image, it is automatically resized as I would expect, however the sizes for inserting the image seem to ignore the settings I've placed in Settings/Media. In my media settings I ...
0
votes
0answers
17 views

How to change where WordPress is looking for uploaded files?

I have a multi-site setup. My main site's theme changed the uploads folder to /media, problem now, is I added a subdomain site, and when I upload a file, it still uploads to /media, and wordpress is ...
0
votes
0answers
44 views

Why does uploading a media file a second time restore older version?

Sometimes I wish to update a media file, but when I Delete Permanently from the library, and then upload the same file a second time, instead of getting the revised version, I instead recover the ...
2
votes
1answer
251 views

WP3.5 Media Uploader - how to make it accept multiple images?

I'm wondering how to make WP3.5 media uploader return 2 or more items in attachement? It always runs once even if 2 items are selected. The code: $('.button').on('click', function(){ var ...
0
votes
1answer
41 views

Insert Image automatically when upload finishes wordpress media uploader

What I am trying to do is - 1) User clicks "Add Media" 2) Select an image 3) Image uploads finishes 4) Now it should insert into post automatically without pressing "Insert into post". Anywhere ...
0
votes
2answers
69 views

How to fix the orientation of images when uploading via the WordPress Media Uploader?

I've been using the Image Rotation Repair plugin to fix the orientation of images when uploading using the Media Uploader (some images taken on my camera phone are not rotated on upload, resulting in ...
0
votes
2answers
131 views

Handle lots of images within the media uploader / selector

I currently have a website containing more than 3K images (and counting...) within the media library. When the user opens the Media Uploader to select or upload an image to a post the media selector ...
0
votes
1answer
43 views

How to get post thumbnail to be equal to set media size

I'm new to learning WP theme development so I may not have worded the title perfectly but that's the best way I could think to explain it. My theme is on a localhost so I can't link to it but here is ...
3
votes
5answers
12k views

How do I link directly to uploaded files?

I have uploaded some files (images) which I'd like to link in my own site as well as other places, but usually I try to host a different resolution of the same image to show up on other sites. My ...
0
votes
2answers
68 views

Can't upload media, permissions are correct

I did a manual backup and re-install of a WP site, and it worked fine. Then my client updated some plugins, regretted it and asked me to restore the site to its previous state. I used the same backup ...
0
votes
1answer
53 views

How To Pick Custom Size Of Uploaded Image In Theme Via the_post_thumbnail();?

I am designing a magazine style theme and I want different image sizes as to show on index.php page. Now for this, I am using <?php the_post_thumbnail( array(100, 100) );?> but it is picking ...
1
vote
0answers
79 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 ...