Access the resized images generated by `add_image_size()`

The images URL are direct. They are not part of WP rewrite system, they are not stored as explicit metadata, they are never used for reverse lookups in core.

It is possible to make fair attempt at reversing URL, see Turn a URL into an Attachment / Post ID.

But it’s not a normal workflow or reliable. You could as well have users put attachment IDs in shortocode (possibly with a bit of helper interface) and get much more reliable code flow.