Questions tagged [uploads]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
12 views

Unset image sizes before images are uploaded

I would like to unset image sizes before uploading images that are not meant to be featured images. Right now I have a clunky workflow where, whenever I upload images, I comment out the custom image ...
2
votes
1answer
21 views

Intercept request to /wp-content/uploads/random.file

I want to intercept requests to public files in WordPress, more specifically all requests to any file located in /wp-content/uploads. Using request or even init filters didn't help, e.g. add_action('...
0
votes
0answers
10 views

Real time file scan service for malicious upload - PHP/WordPress [closed]

We have a WordPress website which is having a form with file upload function. Our expectation is to perform a real time scanning and nobody should upload any malicious file within the form. It should ...
0
votes
0answers
10 views

Uploading bulk product images to wordpress through CSV

I want to upload product image to Wordpress, but the main problem i am getting is i am using images from external website and the issue i am getting is. For example i want to upload 2 images i am ...
2
votes
0answers
34 views

How to host different file formats/types for a media attachment without creating multiple attachments?

For a better browser compatibility we often have to maintain multiple format of a media. For example: Image - JPG & WebP Image animated - GIF & WebP Image transparent - PNG & WebP Video - ...
0
votes
0answers
36 views

Plugin wp-offload-media stopped working

I've just noticed that the plugin wp-offload-media has stopped working in my WP page. It stopped uploading to AWS but uploads to where the WP install is. How to debug it? I'm not experienced at ...
0
votes
0answers
21 views

Trying to generate a CSS file in wordpress uploads folder

When we customise the page in WordPress, it shows Additional CSS option in left panel, Customizer settings are saved by hitting the ‘Save & Publish’ button. This also saves our custom CSS added in ...
0
votes
1answer
17 views

Missing a temporary folder not fixed

I uploaded my first wordpress website on the server, but trying to add new media files, i have got the message "Missing a temporary folder", I tried the solutions on the forum: define('...
0
votes
1answer
13 views

Is it possible to pull all featured images from WP database only?

We are creating a new website and want to pull all featured images into the new site, but we don't want all the images from the WP database, only the featured blog post images. Is there a plugin or ...
0
votes
0answers
16 views

Wordpress Multisite: Images moved to /sites/1?

I noticed that my older images are no longer getting resolved by Wordpress 5.3.4. - the file doesn't exist on that path and 404 gets returned. For images that were originally uploaded to https://www....
0
votes
1answer
15 views

How to fix Uploaded to this post option to see group of images uploaded to a post?

I'm transferring a site using the WordPress importer and Exporter settings. First, I downloaded the Posts content and the Media content, so I have two xml files. After importing in the new site, I ...
0
votes
0answers
14 views

How to remove media by filename?

For some reasons, when I´m doing an import of data to make posts and medias, I can have : Some media not attached but with an image Some files still saved in uploads folder but not visible in Library ...
0
votes
1answer
12 views

Loading and Referencing Images

I'm slowly writing a page to manage an asset database; effectively, writing a very basic plugin. I want to import photos and found some excellent examples of how to do this and, made it work! My ...
0
votes
0answers
11 views

Restrict Users to Only Edit Media Owned by Users in Their Role

I want my users to only be able to edit media that is owned by other users in the same role as them... So far all of my research online the past two days have resulted in almost nothing useful to me, ...
0
votes
0answers
13 views

Bulk upload images with custom URL

I am running a library system on Wordpress. Right now, my book cover images are saved like this: /wp-content/uploads/2020/06/[book_barcode].jpg I want to change this to /wp-content/uploads/library/[...
0
votes
0answers
30 views

Front-end upload image, no image preview in media

I have form to upload image via Ajax, it's works efficiently. But image not have preview thumbnail like : if(isset($_FILES['file'])) { require_once( ABSPATH . 'wp-admin/includes/image.php' ); ...
0
votes
0answers
8 views

SVG files doesn't show dimensions anymore?

My Wordpress Media doesn't show SVG file dimensions. Do you know the problem? Before: After :
0
votes
0answers
19 views

wp_generate_attachment_metadata generates 503 Service Unavailable or 500 timeout errors

I've been struggling for a week with this... I was trying to upload an image with media_handle_upload but it never worked (it always timed out), so I decided to break it down to see where it failed ...
0
votes
1answer
91 views

Frontend AJAX Media Upload returning 404

I am building a custom registration form for users where they have to upload an image of government ID. Using AJAX for submission. The handler function always returning a 404 status error, no matter ...
0
votes
0answers
49 views

media_handle_upload() with 1 image under 1Mb chokes my server and returns timeout error

I'm struggling with 500 Timeout Errors when uploading images. Initially I was trying to upload 4 images at a time. Then I changed my code to upload 1 image at one time. If I strln() the $_SESSION I ...
0
votes
0answers
22 views

Adding Wordpress “Add Media” button from Classic Editor to a Custom TinyMCE Textarea

After Gutenburg, Wordpress almost forgot Class Editor, Classic editor runs on a old TinyMCE version. I want to have the newer TinyMCE for my site. But the Add Media Button, from WP editor is also ...
0
votes
0answers
53 views

media_handle_upload() returns Specified file failed upload test

I am trying to make media_handle_upload() work but I keep getting 'Specified file failed upload test.' This is how I am testing it: <html> <body> <form method="post" enctype='...
0
votes
1answer
34 views

WordPress PHP custom function is causing 500 Internal Server Error Connection Timeout

I wrote a custom script to insert a post into WordPress and upload 3 images to the WP uploads directory. To write the post I use the WP function wp_insert_post( $wp_post_array, true );. Inside the ...
1
vote
1answer
16 views

Disable all resizing and compression

How do you successfully disable all image compression and resizing? I would like Wordpress to use the image exactly as it is uploaded. same pixel dimentions, same quality. I have gone down the route ...
0
votes
1answer
33 views

In the media Rest API, what is “missing_image_sizes”?

I'm trying to understand the media rest-API. The last item in the schema: What is this? Missing vis-a-vi what exactly? Is this information used somehow by default? Reference: developer.wordpress.org/...
0
votes
0answers
16 views

How to upload an auto-generated URL Screenshot in a User Submitted Post?

I have a form that allows users to submit a post, and one of the fields is a URL. I would like the form to submit that post, and also upload a screenshot of the URL that is generated by the code. I ...
1
vote
2answers
109 views

Force documents to appear in Featured Image dialogue

Having a perplexing issue... ...for a custom post-type called 'Resources' I used the 'Featured Image' or 'thumbnail' function within WordPress to allow users to attach documents to 'Resources'. The ...
0
votes
0answers
44 views

what functions to use to resize images and create DB metadata for them after/during upload?

I am working on my first script to create a WP post with images and upload those images to the uploads folder. I am clear about wp_insert_post and was able to upload an image to the server with ...
1
vote
0answers
25 views

Merge Multisites with Shared Network Media Library

So have a multisite setup which no longer needs to be a multisite but I'm left with a bit of a mess since I used Network Media Library plugin to host images for all sites on the network. I'll try to ...
0
votes
0answers
23 views

the content of the uploads folder gets deleted periodically, how to figure out what causes it?

The entire content of my uploads folder gets deleted periodically. every few days, I'm not sure when exactly. How can I debug what causes this? My set up is complex: around 10 plugins, some custom. ...
0
votes
0answers
17 views

Snippet overwrite media files?

I'm looking for a snippet that will overwrite media files. Example: There a audio file called Dogpark.mp3 uploaded to wordpress. The next week I have a few file called Dogpark.mp3 which I want to ...
1
vote
0answers
19 views

Syncing Avatars across multisite

There's gotta be a way. I have tried a bunch of different multisite sync plugins and they sync users and roles just fine (even paid for plugins to do so)....but avatars don't sync. My registration ...
1
vote
1answer
46 views

Image upload via FormData API and AJAX is not working ($_FILES always empty)

When I try to do what's mentioned in the title, my requests all work (nonce check passes, and server response 200 receveived, and server - script also working properly). My problem is that I cannot ...
1
vote
0answers
21 views

Select multiple images from custom field

I've created a custom field with image select/upload. This only makes me select one image, but I want to be able to select multiple images. Been looking for this quite some time but still not managed ...
0
votes
2answers
16 views

Moving Existing images from custom directory to WP's upload directory

I have a site I'm working on and when it was developed they had all the media uploads go to folder called /assets/ in the root of the WP install. This is being done via: define('UPLOADS', 'assets'); ...
1
vote
0answers
32 views

How to upload a file to a folder named after the user_id via plugin

I'm trying my hands at my first plugin, nothing fancy just want to grab the user_id, create a folder for each user and let the user upload an image. I know my code can't be completely wrong, because ...
0
votes
0answers
25 views

Upload Image through pods form to create custom post type

I'm using the pods framework for all custom post types on my wordpress site. The customer I'm building the website for wants to have a form, where his affiliates can submit their company and some ...
0
votes
0answers
120 views

How to restrict access to wordpress upload by specific user

I've added this to the downloads.php in woocommerce my account: <?php $current_user = wp_get_current_user(); $file_for_client = get_field('upload1232423', $current_user); if( $file_for_client ) :...
0
votes
0answers
31 views

Generate and upload screenshot as featured image for user-submitted post

I have a website where users can submit posts (the posts must have a URL of a website). I would like to use a screenshot of that URL to be the featured image. I have used this code to generate the ...
1
vote
0answers
18 views

How to get the upcoming post ID from front end?

Searching with "Next Post ID" is giving me the Previous/Next Post Navigation, but my question is not related to that. In WordPress Admin panel, when we're attempting to create a new post the post is ...
0
votes
2answers
25 views

Wordpress shows different upload_max_filesize than php.ini setting

I have php.ini files in the following directories of my WordPress installation: /wp-admin /wp-content / (where there wp-config.php lies) In all of them I set upload_max_filesize = 640M; - 640MB is ...
0
votes
0answers
10 views

Uploading multiple images from url list with php - Wordpress

I have a list of xxxx image urls. 1- I want all images from a field where I can enter a url list to be uploaded to the wordpress media library. 2- The attachment ids of all uploaded images will be ...
0
votes
0answers
8 views

Video upload fails at 83% every time

I have my upload threshold set to 256M. Every time I try to upload a file (97Mb), it stalls at 83% and fails. I can't find a single piece of information on this and it can't be unique. I have no ...
0
votes
0answers
10 views

Failed to upload pa_color color-name

I have installed WordPress and installed Konstructo - Construction and Architecture WordPress Theme. I have followed the steps given in the theme documentation. Then I click the Import Demo settings ...
0
votes
0answers
12 views

Show image in wordpress media and assign it to post from bbdd

I have tried to do this in many ways but i just cant figure it out... The process i am hoping for is: Upload image to ftp wordpress upload folder (with year and month, as wordpress usually does). ...
0
votes
0answers
12 views

Make media fields required on upload in WordPress

I am trying to force the user to type in a caption (and/or the other fields) when they upload an image. That way they can't forget to put in the copyright for the images. Is there a hook and how can ...
0
votes
0answers
31 views

How to move files to media library/upload directory?

I made a mistake uploading my files and I don't want to re-upload it again. I wanted to make my files available to download by any users, and in this tutorial, it shows how to do that. Unfortunately, ...
0
votes
0answers
16 views

Could creation of various image sizes cause slow form submission response?

when I submit an image to WP media gallery or trough various plugins, the process takes quite some time to complete. A 4MB image takes like 2-5 seconds to upload (got fast connection), then there is ...
0
votes
1answer
243 views

Unable to upload images into the media library

After moving my website from one host to another I am unable to upload new pictures in my media library either by directly using the Media > Add New menu or by adding media from within the new post ...
0
votes
0answers
22 views

unsharp thumbnails after uploading image

I googled for a whole day and didn't found a solution. I tried a lot of plug ins and so on, but didn't get it. If I upload for example that image here: https://deermylove.com/wp-content/uploads/...

1
2 3 4 5
37