Media Library is a WordPress panel that display all files you've sent. There you can add ne files, attach files to posts and pages etc

learn more… | top users | synonyms

1
vote
0answers
28 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 ...
0
votes
0answers
9 views

Programmatically add media to gallery from Gravity forms [on hold]

I have a bit of a weird issue with a website I'm working on. I'm trying to get thumbnail sizes of images that were originally uploaded to Gravity forms and having some trouble. Users fill out a ...
1
vote
1answer
462 views

Share media among different domains

I have multiple Wordpress instances that live on separate domains (not a multisite installation). Since they provide the same content in different languages I'd like to share the images among these ...
5
votes
1answer
346 views

Adding more options to the instance of an image. (Attachment Display Settings)

I'm trying to build a simple reusable plugin for image presentation in Wordpress 3.9, and it seems I've hit a brick wall. I would like to be able to add a couple of options to the instance of the ...
0
votes
0answers
25 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
15 views

How can i upload files to a dir other than media library

I am developing a custom plugin . That plugin need to have upload functionality which will not be images and should not be seen in media gallery . How can i set a custom upload directory which can ...
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 ...
0
votes
1answer
66 views

How add a group by to the query used by the media library?

What would be the proper way to add a group by to the media library query? What I have tired so far is not working: add_filter('posts_groupby ', 'limitMediaLibraryItems', 10, 2 ); function ...
0
votes
2answers
650 views

Insert wp gallery shortcode into custom textarea

Is there a way to insert wp gallery shortcode into custom metabox textarea ? I would like to have something like this: New metabox in post/page with textarea and below textarea there are a button to ...
1
vote
2answers
1k views

Hide editor while keeping add media button in custom post type

How do I remove Editor in custom post type keeping the Add media button. When I used as following in custom post type declaration, it removes the Add Media button and I don't need editor in my post ...
0
votes
0answers
22 views

Filter wp_get_attachment_image

I'm working on a new WordPress plugin, that will have to change the media library directly. For that I have to overwrite or filter the wp_get_attachment_image function, that class-wp-media-list-table ...
0
votes
1answer
706 views

Failing to open advanced-cache.php which is breaking Media Library

On my WordPress install, which is 3.8 and has all plugins updated, it is using Magic Fields 2 and Hypercache amongst other plugins. I can't insert images into posts because when I upload, it gives me ...
4
votes
4answers
3k views

What's the proper way to find and remove duplicate images from posts and the media library?

I just exported a largish WP blog from MediaTemple to PHPFog. I used the standard WordPress export and import plugins. For some unknown reason all of my media assets have been duplicated. I now have ...
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
2k views

Organize media uploads in folders - I have a physical access to (my) server

I'm very new to Wordpress. With the help of my friend I installed Wordpress on my server and finally we have our web online. However, I would like to upload some content in media library but I need to ...
0
votes
0answers
20 views

Add Media Library tab to Image upload of Theme Customizer

When creating a custom control in the Theme Customizer to add an image, how do you add a tab for the Media Library in order to select a previously uploaded image rather than having to reupload an ...
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
12 views

Failed to import wordpress xml and media

I am trying to import a wordpress site into a woo theme. The original site from which the imports where made no longer exists but I have the media folder which I uploaded to the new site. I changed ...
0
votes
2answers
15 views

add titles to images in ad media in pages and posts

When editing pages or posts you can press the add media button. This shows a grid of all your images but it does not display the image names. I have lots of similar images and I would like a image ...
0
votes
0answers
26 views

Restrict access to files to logged-in users (WP + IIS)

I have a WP site, hosted on a Microsoft IIS, server which has both a public and a private, registered users only, section. The private section is a repository of pdf files. I've granted access to the ...
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
268 views

Is it important to get the media files attached?

A silly question may be, but I's thinking about the SEO matter, and thinking that, is there anything related to the SEO regarding the Media file attachment? There are 567 images in my Media Library, ...
0
votes
0answers
9 views

Changing the media library view with code

Quite simply, how can I make the list view the default view in the media library rather than the grid view - using code? I came across $tab = apply_filters( 'media_upload_default_tab', 'type' ); ...
0
votes
0answers
41 views

Failed to load resource at admin screen

So I've done Wordpress clean install in a live server. Everything looks fine and seems to work. However, if I go to the admin's edit page or post and try to add or change the featured image, the 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, ...
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
2answers
47 views

Unable to upload images using the Media Library

I have had a site that has been working perfectly for the past few months. Then all of a sudden when I go to upload an image via the Media Manager on the Admin Dashboard I get a 500: Internal Server ...
0
votes
1answer
27 views

Private file system for attachments

Is there a way to make an attachment private? This also includes moving the files to a separate folder for private attachments, even if it's a sub-folder of uploads, to restrict anonymous access ...
0
votes
1answer
15 views

Issue removing Media Editor Tabs — Duplicate Items

I'm following the advice found in several places to remove tabs by using the following filter. However, the same number of tabs appear, the last one is simply displayed x number of times. I'm running ...
2
votes
2answers
430 views

Get url of thumbnail from the media uploader

I want to select image from the WordPress 3.5 media uploader. I can get the image URL with the following code, but it gets the full size image. I want to get the thumbnail image url,how can I get ...
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 ...
3
votes
1answer
46 views

Bind event on Media gallery elements WordPress

Good day ! Please help to get binding on WordPress Media Upload elements. When i click on any of gallery item need a custom function to fire up. There is a BackBone collection called "Attachment" ...
0
votes
1answer
59 views

How to rename an image attachment filename using php

I have the ID of the image uploaded and I need to rename it using php. (The reasons because I have to do it are difficult to explain and I think they are not even necessary for the purposes of this ...
0
votes
1answer
33 views

Retrieve Image from Media Library by it's category

What I am needing to do here is get an image from the media library only by it's category. It won't be attached to a post, meaning that, the image will not be uploaded as a "featured image" of any ...
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 ...
5
votes
2answers
2k views

How to restrict images in v3.5 Media Library modal to only those from a specific post id?

How can someone restrict the images which appear in the v3.5 Media Library modal to only show those that are attached to a specific post id? I'm creating a front-end management template that allows ...
0
votes
0answers
37 views

Access to the header cropping tool in modal

For the moment I access the media uploader via a meta box from the edit post screen. The code works: no problem. However, I would like to know how to be redirected to the crop tool right after the ...
1
vote
0answers
78 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
1answer
56 views

Post slugs and images cannot have same name?

If I go to Media Library and upload an image called apple-pie.jpg And then I create a post called www.domain.com/apple-pie/ The link does NOT take me to the post. Instead the link will take me to a ...
0
votes
1answer
23 views

How to get only current images of a post

I am new to WordPress. I have created a template page where I want to show single posts, So to get media of that post I am using a function $args = array( 'post_type' => 'attachment', ...
1
vote
0answers
53 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 ...
0
votes
1answer
32 views

How to upload unknown file type?

I've already read about mime types in wordress and how to add them, but I can't find any documentation about the correct type of files. For e.g. after a lot of research I find out that the epub ...
0
votes
0answers
15 views

Adding photoship mime type in plugin

I read over other posts about adding mime types, but I am still unsuccessful. Here is the code in my plugin: add_filter('upload_mimes', 'custom_upload_mimes'); function custom_upload_mimes ( ...
0
votes
0answers
16 views

Preventing a user from inserting a gallery using the Media Uploader, causes errors

As the title suggests I am trying to prevent a user from inserting galleries. This can be achieved with: function remove_media_library_tab($tabs) { if(!current_user_can( 'administrator' )){ ...
0
votes
0answers
41 views

Copy image url to my own field in media upload

i have add new field in media upload for slider plugin. what i don't get it how to copy the image url to my own field. look at the screenshot:
0
votes
0answers
29 views

How to show description of media library under an inserted image?

What i want to do is showing automatically the imagedescription, inserted in the media lib, if available. I found this solution, How to show description under an inserted image? which is great, but ...
1
vote
0answers
102 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 ...
0
votes
0answers
805 views

File(X) is not within the allowed path(s):

I installed wordpress on a windows server with Parellels. It is a shared hosting. When i upload images it gives the following warning: Warning: file_exists() [function.file-exists]: open_basedir ...
0
votes
2answers
119 views

Change default screen option value for media items per page (in media library)

I want to remove pagination by changing the default screen option value for posts per page, pages per page and media items per page, in the admin area, to 999. The default value is set to 20. I found ...
0
votes
0answers
317 views

Custom post type Featured Image popup not working

I added a custom post type with thumbnail support. When I navigate to the custom post type in the admin backend and add a new one, I can add a featured image. The problem is, when I click the link ...