An image, audio or a video comprises a media.

learn more… | top users | synonyms

0
votes
0answers
11 views

How to hide media link to settings?

I want disable MEDIA LINK TO settings for authors. I tried following code, but authors are still able to change settings. add_action( 'print_media_templates', function(){ echo ...
0
votes
0answers
10 views

Disable Media uploader to users

Is it possible to disable the Media uploader to anyone lower than an admin, but have the select file(s) window show?
0
votes
1answer
18 views

media sideload image not working with JPG file

media_sideload_image function not working for image url with JPG extension, its working fine for jpg (http://example.com/image.jpg) and png (http://example.com/image.png) but not with JPG ...
0
votes
0answers
24 views

Media Library grid view borken [closed]

The gird view of Media Library is not working. it looks like its just loading forever with that circle spinning. The list view works fine though. Any idea how to fix this? Edit 1: If you are having ...
0
votes
0answers
11 views

Manipulating images in the media editor changes file URLs

it seems like, using the media editor to resize images, WP appends a string to the newly generated files, e.g. "...-e1428487180626.jpg". This is causing broken image links in some cases (i.e. where I ...
-2
votes
0answers
12 views

How to add media uploader to add author image in user profile [duplicate]

I want to add media uploader to add author image in user profile. I am trying to search since two weeks but unable to find any solution that works.
0
votes
0answers
22 views

wp_enqueue_media problem

I am trying to build up a form where user can request some post information including feature image. For uploading the image i have used wp_enqueue_media() which works nicely in all free themes ...
0
votes
1answer
34 views

How can I bulk delete media and attachments using WP-CLI?

I'm trying to mass delete 4000 images in a wordpress website. WP itself sets the max to 999, which would work fine and take a few minutes to delete them via the backend. However, I get REQUEST URI TOO ...
1
vote
2answers
30 views

Change WordPress' media upload URL?

This isn't the usual "How do I change the media upload folder?" question. Our entire site is run through a CDN. The CDN drops POST requests with a 5-6MB file so the WordPress uploads fail. I can work ...
0
votes
1answer
21 views

Disable image rename on upload

When I upload an image (test.jpg) with the Media manager it creates the same image with a digit after its name (test1.jpg). I disabled image cropping so files like test-[width]x[height].jpg don't ...
0
votes
0answers
20 views

Media and products does not show after adding new

Hello fellow wordpress developers, I have created a site with wordpress and woocommerce and I have a problem with the media and the products. After I enabled quick Cache (now I think it's called ...
0
votes
0answers
23 views

How to change html generated by wordpress media uploader

I have managed to change the output of wordpress media uploader using image_send_to_editor exampled below (where the output is image:($url)) However I want to do the same with other files like ...
0
votes
0answers
9 views

Triggering a task to a queue upon saving a custom post

Here's my ideal scenario for the use case I'm exploring. 1.) user creates a new custom post type record with a bunch of custom fields. One of these is a url field. 2.) upon saving the record, I'd ...
0
votes
0answers
121 views

Custom dropdown filter in media grid view

With the new grid mode in the media library the good old WP_List_Table specific restrict_manage_posts filter for adding custom filtering options is not available. All happens through JavaScript. I ...
0
votes
0answers
17 views

Get metadata of all files in the media

I need to retrieve metadata of files that are not images such as word, excel or pdf documents. I tried using get_post_meta( $post_id ); and wp_get_attachment_metadata( $attachment_id ); I'm only ...
1
vote
1answer
57 views

How to retrieve a value from an input field in a media view template

I've created a media view template with two input fields (width and height) and I was wondering how to retrieve the values entered in them in a media controller o view. PHP: function ...
3
votes
2answers
92 views

Add inline uploader to plugin option page

I would like to implement an inline file uploader to my plugin's option page as introduced in new media grid view of the WP media library: I imagine having this drag & drop uploader in the page ...
0
votes
0answers
9 views

How to manage assets in gigantic multi-page website?

I need to manage assets in Wordpress dynamically. When I mean assets, I don't mean the media (videos, photos, sounds). In my website, I have custom posts that can get customized with icons, banners ...
0
votes
0answers
24 views

Add/change multipart_params parameter when uploading post image

I'm working on plugin that optionaly manipulates uploaded content (images). I managed to add some additional fields on "Insert media" popup under "Drop files anywhere to upload" text, but I need to ...
0
votes
0answers
25 views

Rotate image media item 90° anti/clockwise ajax front end function?

Is there a rotate image function that I can create a button on the front end of my website, using ajax inconjuction with the id number of the media item? I'm thinking having 2 buttons, rotate left ...
1
vote
0answers
63 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: ...
1
vote
1answer
159 views

Increase Size Limit of Media Files Wordpress 4.1

I have edited (created) the php.ini file and the .htaccess file in accordance with this post. I have also found a plug-in (called Upload Max File Size) that claims to raise the file size limit of ...
3
votes
1answer
68 views

Insert Images at Master Uniform Height

I'm trying to figure out a way to insert images from the media library into the post editor at a uniform height... but by selecting one option. For example, I set a height like "300" somewhere (like ...
4
votes
3answers
112 views

Stop WordPress from reserving slugs for media items?

I am experiencing some odd behavior, that apparently happens "out of the box" with WordPress. If I upload a file through the media manager called: services.jpg; then go try to create a page with the ...
0
votes
1answer
25 views

Customize WordPress Upload Directory

I'm trying upload certain files to the following custom director: /wp-content/uploads/audio/yyyy/mm However, the year and month directories are not being created properly. They are showing up like ...
1
vote
1answer
94 views

Switch to the library tab in the media uploader

I'm developing a plugin that adds a tab to the media uploader to add external videos to the media library via oembed. Everything works as expected but I need to switch to the library tab after adding ...
0
votes
0answers
46 views

Media Library broken images

When I upload image to WP they randomly appear as broken links I can drop the files on the Media Library or Select the files and some files are always shown as broken. I can delete the files and ...
0
votes
0answers
11 views

media_handle_sideload duplicating images

I'm using media_handle_sideload() to copy featured images for news stories to local Media items. But the trouble I'm having is that when doing so, the function seems to be creating duplicate entries - ...
0
votes
0answers
25 views

Force relative path in media library for LAN deployment

I have created a Xampp powered local wordpress install. This will be used at my work as a sort of "intranet" using LAN - I have no intentions of deploying it on a server, as it is not required by what ...
0
votes
0answers
25 views

Is it possible to use media_sideload_image to upload local files?

I want to add media_sideload_image to upload a file programmatically . I've got it working when the image URL is online (e.g. http://etc...) but not when it's a local file from my hardrive or network ...
0
votes
0answers
23 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 ...
0
votes
0answers
30 views

How Can Make Slug Editable in Edit Media?

Default wordpress is allowed to change only last part of attachment permalink. But with some seo reason and duplicate word problem i want to make slug editable. There are any way to make slug ...
0
votes
1answer
138 views

Correct Post Count ( All | Published | Drafts | Pending | Trash ) for Custom Post Type when restricting to view own posts

I want to restrict users in wordpress to view their own post and media items only. Following the steps given in the below link I have developed the plugin to restrict users to view the own posts and ...
0
votes
0answers
98 views

WP media manager in metabox to choose all media types

I'm trying to make a metabox for featured media on my posts, and would like to use the Media Manager like it is used in the editor, which is with all the options. I've tried this and similar things ...
0
votes
0answers
40 views

New tab on featured image modal

I need to add a new TOP tab on the media upload modal. I tried with the media_upload_tab hook but is not working because it simply add a new tab on the modal's sidebar that is showed only when you ...
0
votes
1answer
41 views

Upload images using FTP and show them in media

Hello, This weekend one of my websites was hacked and all photos was removed (the folder uploads). That means the images in my site doesn't work. :( I had a backup of that folder and I have recovered ...
1
vote
2answers
121 views

Maximum upload size changes in php.ini ignored - How to remove upload size limit?

I'm working on a multisite WP installation and I need to import content from other Wordpress sites (.wxr files). When I use the Import WordPress plugin I got the following: The maximum allowed ...
0
votes
1answer
50 views

Media Manager: refresh library after new selection

I have created a custom field into a metabox with a button that opens up the media manager and allows the selection of multiple images. On the "open" event, the gallery retrieves the images IDS of the ...
0
votes
1answer
31 views

Open Media Uploader Link in single post or page

I want to open the media Upload Window like in a single post or page. It is important for me, to have that menu on top, which filters the media Library: This is my current code, which allows only ...
0
votes
0answers
100 views

Failed media upload: “The uploaded file was only partially uploaded.”

I am running Linux CentOS 5.8 and I have my web pages using WordPress 4.0. I am trying to uplad jpg photos to server via WordPress, but it randomly fails. I uploaded few photos, and then I get ...
0
votes
1answer
80 views

Upload mobi and epub file in the MEDIA of WP

How can I upload mobi and epub files in the MEDIA of my WP site? I want customers to be able to download my ebooks in the epub and mobi version also, not just in PDF !!! I know there is an HTML code ...
0
votes
0answers
67 views

Access post_type from url inside media modal window

In the new post screen of a custom post type i.e. wp-admin/post-new.php?post_type=product you click add media button and it brings up the media modal. You can add custom functionality to thise via ...
2
votes
1answer
30 views

Organizing media uploads

One of my clients wants to transfer his WordPress website to my server. The problem is his website doesn't use sub-folders in his upload folder, and he has more than 1,000,000 files in the root of his ...
0
votes
0answers
40 views

Set featured image using wp_insert_post

// Auto post ( Unique File Date ). $postData = array( 'post_category' => array( $Category ), 'post_status' => $Post_Status, ...
2
votes
1answer
76 views

Run script after clicking Set Featured Image in Media

I would like to run some script to get the featured image's width and height after the user clicked 'Use Featured Image' button and use the data retrieved within the Post Edit screen. Is there such ...
0
votes
0answers
11 views

Media upload privelages have been disabled for administrators - any ideas?

I have a nearly finished installation of Wordpress that was working fine. Then at some point the permissions for uploading images died for Administrator statuil. Details are: The issue: - I first ...
0
votes
1answer
30 views

Automatically Insert Into Post when uploading Media

When files are uploaded, I would like the, to automatically get inserted, bypassing the need to click on the "Insert into post" button I use WordPress Multisite 3.5 I tried the following, but it ...
0
votes
1answer
33 views

How to retrieve images attached to post through media library?

I have been struggling to retrieve image attachments to specific post without success until I found that images inserted into the post via media library are not treated as attachments. That is, you ...
0
votes
0answers
48 views

How to change existing image links to go to Attachment Pages?

Currently, all the images on the posts are linked to their parent post pages so that when you click on an image, it'll try to to go to the parent post page. But due to a recent Permalinks change, it ...
0
votes
0answers
25 views

Change categories count to include media attachments

I am creating a gallery that will automatically display new images from a chosen category and its subcategories. I have set up the categories so that they will apply to media using: ...