One more thing – I think the basic idea of the change I made is correct, however it’s unclear to me whether to use $response['url']
or one of the attributes on the $attachment
-object — e.g. get_attachment_link( $attachment->ID )
(I don’t know a lot about WordPress internals).
(Note to self: https://wpseek.com/function/wp_prepare_attachment_for_js/ – the filter is called from here, so here almost all the $attachment
-attributes are listed)
P.S. Hope everything went well with the surgery, and that you’re feeling OK ??