I'd like to get the name of an intermediate file based on it's original attachment without relying on its post meta. As the registered image sizes e.g. thumbnail have been unregistered, the post meta is unreliable.
For example, if the attachment is named
test.jpg and when it's uploaded, it typically generates the filename
If I use
wp_get_attachment_image_src( $attachment_id, 'thumbnail'), it returns an array like so:
 => https://domain.com/wp-content/uploads/2023/06/test.jpeg  => 106  => 150  =>
I was hoping it would be:
 => https://domain.com/wp-content/uploads/2023/06/test-106x150.jpg  => 106  => 150  =>
Is there another way?