media_sideload_image with rewritten urls?
You’re right, it’s because by default, wp_handle_sideload() requires a valid extension in the URI in order to continue processing the sideload. That is, unless your role has a capability called ‘unfiltered_upload‘, which by default is only given to admins. If it seems appropriate (and safe) for you to grant this capability to the user role … Read more