Changing a permalink shouldn’t give you a 404, since the old slug is redirected to the new one by core.
We’ve mentioned two plugins that do it.
If it were in core, I would think it would be a function with a new action like ‘media_file_renamed’, giving the old and the new names, so that plugins could hook in and update whatever they need to update in addition to fixing the attachment meta data and find/replace in content.
1 Like