I am using media_handle_sideload
function to upload images in my plugin. Is it possible to disable image resize or set it to a specific size and do not make copies (upload only resized image).
I am using media_handle_sideload
function to upload images in my plugin. Is it possible to disable image resize or set it to a specific size and do not make copies (upload only resized image).
If you look at media_handle_sideload
in source, you can see how it works.
The function that generates the various sizes is within wp_generate_attachment_metadata
, the image_make_intermediate_size
function.
You could possibly use the wp_handle_sideload
function instead and manually resize it via image_make_intermediate_size
.