This include all question concerning the process of uploading file, whether from the WP Admin Pages or from a front end editor.

learn more… | top users | synonyms (4)

0
votes
0answers
7 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 ...
0
votes
1answer
20 views

Restrict role to view own media

There are plenty of solutions for limiting access to view your own uploaded media but I was wondering if it was possible to limit media to a user role ( e.g. author's can see all other author's media ...
0
votes
1answer
12 views

Saving file to disk receiving fopen error

I have a requirement to save a json file to disk. I've got as far a the below php. However i get the following error. fopen(/wp-content/content/uploads/artworks.js): failed to open stream: No ...
0
votes
0answers
10 views

Media library only shows for admin. Doesn't show editor or below

There is no problem of viewing the media as an administrator. But when we login as an editor any other lower roles the media library does not load the content (see screenshot). It does work on this ...
0
votes
0answers
25 views

Password protect any file in WordPress

I have found that password protection with .htaccess & .htpasswd files is the only way to protect any WordPress file. I wanted to make few of my media files accessible by specific username and ...
0
votes
0answers
7 views

HTTP Error after finishing uploading a video that is bigger than 64 MB -> After raising the upload limit manually in the wp-config file

I use dreamhost as my webhost. Previously my wordpress upload limit was 64 MB. I asked the tech from dreamhost to boost to 400MB. He told me I had to change a setting in my wp-config.php. That's what ...
0
votes
0answers
14 views

Unable to upload image using the standard uploader in the WP admin (v4.3)

I am running WordPress 4.3 and in the admin I am no longer able to upload images using the standard upload image tool. I am taking over a project from another developer so don't know exactly what ...
0
votes
0answers
14 views

Wordpress Media Library - Upload space used

Navigating to Media -> Library, I don't get the upload space used displayed: as I should based on various screenshots on the net: Im using WordPress 4.2.6 and Im self-hosted on a shared hosting ...
0
votes
0answers
8 views

wp_upload_bits Upload Specific Sizes Only

For images uploaded using this code, I want to only upload the full-size image and the thumbnail (whereas for images uploaded through site, I want all sizes). However, I can't figure out how to make ...
4
votes
3answers
75 views

How to save media files under “http://example.com/custom_folder” for a specific page

I want to upload images in a specific folder like http://example.com/custom_folder. Note: Not in http://example.com/wp-content/uploads/custom_folder/image1.jpg
4
votes
1answer
40 views

Advanced Custom Fields Multisite Upload/Imagery Issue

OK, so I'm using: WordPress 4.4.1 (the latest version at this time) Advanced Custom Fields PRO v5.3.3.2 (the latest version at this time) I'm having a very strange issue that I cannot seem to fix. ...
0
votes
0answers
20 views

Use Media Uploader on Multiple Images on same page

I have multiple image user meta fields on the same page and am using a media uploader jquery script to set the URL as the text fields value when the image is clicked. Works ok on one image field but ...
0
votes
0answers
27 views

Compression of original picture during upload?

WordPress compress scaled thumbnails of image during upload, but, original image will be is same quality. I am trying to compress original image too. I wish to make image in original resolution ...
0
votes
0answers
13 views

How to require value for Alt attribute for an uploaded image?

When a user adds an image via the Add/Insert Media dialog I'd like to require the Alt Text field not be empty. Ideally, disable the [Insert Into Post] button and send some type of alert that the Alt ...
0
votes
0answers
26 views

Define JSON file values by admin user

I have couple of long JSON files with predefined keys and want to have the values updated by the admin user. So I'm looking for a way where the developer (SuperAdmin in my case) can upload a JSON file ...
0
votes
1answer
31 views

Accessing an image via ajax

The goal with this is to create a random banner, managed in the wp admin. I can create a banner solution in the wp admin without an issue but need a little help on the ajax side. I have an image ...
0
votes
0answers
36 views

I have problem in adding image in post or page

I have a wordpress site and I need to add image or any media into the page or post that cannot add into the content of the page or post but the image can be added into the media at admin panel and I ...
0
votes
0answers
26 views

Upload Image using wp_insert_attachment and file url don't have file extension

I need to upload an image using $filename = 'www.domainname.com/images/12345'; $filetype = wp_check_filetype( basename( $filename ), null ); $attachment = array( 'guid' => ...
0
votes
2answers
17 views

Resize existing library images

How can I resize images that were already in the Media Library when I created new custom image sizes? I just want WP to process them as if they're new images, taking into account my new settings, ...
1
vote
1answer
36 views

List and show uploaded pdf files dynamically

I want to show all the PDFs for a specific WordPress page. I exactly want that the PDF documents will upload from the admin panel and I want to show all the PDFs in a page in the front-end ...
0
votes
0answers
6 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 ...
1
vote
0answers
23 views

Add custom JavaScript that is a combination of CDN/uploaded files and easily-edited code?

I would like to add some custom JavaScript to my site: a combination of external CDN-hosted files, static library files hosted locally, and local JavaScript that I'd like to be able to edit in the ...
0
votes
0answers
16 views

Custom Image for Each Author, NOT profileImage - Front end only

I been battling with this issue for months now. Finally decided to ask for help... Stubborn, I know :( I have this WordPress website, where each author has his own profile and edit his own profile. ...
1
vote
1answer
12 views

Handling email piping attachments and detecting unsupported file types

I have a plugin that I am working on which uses Email Piping. When an email is processed I want all the attachments from the email to be added to the WordPress Media Library. Currently I am using ...
0
votes
0answers
17 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 ...
2
votes
0answers
29 views

WordPress Uploads Directory not using dates in links

I have a WordPress site that was working fine. Suddenly it started looking for media in the wrong folder: www.website.com/wp-content/uploads/path-to-image.jpg This is giving me a 404 because I have ...
0
votes
1answer
30 views

Insert Featured image from Feed

I am importing products through a feed programmatically as follows: $request = wp_remote_get('myapiurl'); $response = wp_remote_retrieve_body( $request ); // decode the json $json = ...
0
votes
0answers
3 views

Widget: File Upload not showing save option

I build widget for uploading files ( pdf, jpg, etc ). Fallowing by some guides from web. There is one problem: after uploading file from media library i dont have the save option enabled in my ...
0
votes
1answer
35 views

Uploaded image doesn't show up in media library

So, I'm uploading an image file which works with the following code however, it does not appear in the Media Library. I get a "File is valid, and was successfully uploaded" message but I must be ...
0
votes
0answers
12 views

Automatic Animated Gif Resizing Support

I'm trying to find a way to support animated gifs upload to my wordpress installation and automatically resize it without losing the original animation. I've read some threads about this, there is an ...
0
votes
1answer
36 views

How do you clean a filename after image sideloading a url that contains `%20`?

Right now I'm creating a plugin to sideload images from an external source. The UI allows me to select files on the external server then downloads them via AJAX & media_sideload_image. ...
0
votes
2answers
36 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
0answers
27 views

Sharing a common set of image files for media library, across all sites within multisite

In mutisite, the uploads directory structure looks like this: /wp-content/uploads/sites/1/ /2/ /3/ Each number is the id of the site within the ...
0
votes
2answers
29 views

How to modify images during upload

I'm developing a plugin, and, each time a user uploads an image in the media library, I'd like to modify metadata of this image. I have tried with the hook "wp_handle_upload_prefilter" but it seems ...
0
votes
1answer
28 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
41 views

Create Custom Post Type PDF File (Like Media) Then Add Searchable Custom Fields

I want to create a simple website that stores PDF for search. The PDFs do not need to be searchable themselves (I mean, that would work, but there are only three items on each file so using custom ...
0
votes
1answer
52 views

Upload and attach to a post multiple image files [closed]

In a front end form I have a 'multiple' input field for uploading and attaching images to a post and a processing script (from here). I expect that will be uploaded and attached all files that I have ...
0
votes
2answers
26 views

Uploading a plugin as .zip

I have installed Wordpress 4.4 on my own CentOS 7.2 server, and then installed a theme by extracting it to the wordpress theme folder and activating it from them admin part. That is working fine, but ...
-1
votes
2answers
55 views

How can I add a custom meta value on file 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 ...
0
votes
2answers
24 views

Media Upload not working after hiding some elements from functions.php

I have put the below code in functions.php. (It's used to hide some options from client.) But the problem is, after adding these codes, images are not uploading, can't even even uploaded photos from ...
1
vote
1answer
39 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
18 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 ...
3
votes
1answer
62 views

Remove upload_files capability from a role but allow role to manage an avatar image

I have a site with 1 admin, 11 editors, and 4000+ authors. I need to prevent the authors from adding media to the server and using up all the storage. Initially I tried function ...
1
vote
1answer
42 views

Error uploading images (but the images are at the server!)

I have a huge problem with images with a size greater 1MB in my website and I really need some help. If I try to upload an image with a size greater 1MB in my Media Library I get a generic error ...
1
vote
1answer
39 views

How to set post_id to 0 when you upload image via Add media button. (async-upload.php)

How to set post_id to 0 when you upload image via Add media button which will make a requtest to async-upload.php Instead of actual post_id? Thank you.
1
vote
1answer
16 views

Can't seem to upload a file to a custom directory

I am trying to do something extremely simple. I just want to save a file, in a custom wordpress upload directory inside of the media library. But it just won't work. I've tried the solution here, ...
1
vote
1answer
31 views

Filter / Hook to get attachment ID before uploading?

I need to rename the raw file name from camera like DCM4819032.jpg or 2015-12-11-204213.jpg to more organized one like IMG_00015.jpg. I figured I will use the attachment ID as the number in that ...
1
vote
1answer
26 views

Prevent File Uploads other than images

I am trying to prevent everyone from being able to upload any files to my wordpress installation other than images. I am using an .htaccess script in wp-content/uploads folder. Is this a good ...
1
vote
1answer
26 views

Show media-frame-menu on custom Media Frame

I have a plugin I built that adds a custom media frame with the following: media_frame = wp.media.frames.media_frame = wp.media({ title: 'Select your images', button: { text: 'Use Image' }, ...
1
vote
1answer
43 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 ...