Navigation überspringen

[Geschlossen] How can I upload images without (resizing)?

This support ticket is created vor 3 Jahren, 12 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Dieses Thema enthält 1 Antwort, hat 2 Stimmen.

Zuletzt aktualisiert von Christian Cox vor 3 Jahren, 11 Monaten.

Assistiert von: Christian Cox.

Author
Artikel
#1892635

Hi, I want to create a form for user input where a user can send in images. While WordPress usually creates automatically a set of resized images (idle uploading into the media library) this is not needed in my case.

What is the best way to do so?

If there are any (not found by me) documentation or example page a hint will do it for me...

Thanks and a Happy New Year 2021!

#1893261

Hello, typically these added image sizes will be generated automatically during the upload process and there is no filter available to bypass that operation easily. It may be practical to delete them programmatically after upload using the Forms API cred_save_data. For example, this post shows how you can get the URLs of all the resized images:
https://wordpress.stackexchange.com/questions/206509/how-to-get-all-featured-image-sizes-and-their-urls/315447

Then you could use custom code to delete those files from the server:
https://www.php.net/manual/en/function.unlink.php

That's the general idea, but it depends to some extent on how these images will be used on the site, and how they are uploaded. For example, are the images stored in a custom field value on some post or in a User profile? Do you plan to display the images on the site somewhere? Will they be stored in the Media Library? Do you just want them uploaded to the server for some other 3rd-party reason, like an image post-processing system?

Das Thema „[Geschlossen] How can I upload images without (resizing)?“ ist für neue Antworten geschlossen.