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.
Related Posts:
- Changing playlist shortcode thumbnail sizes?
- change wordpress gallery shortcode to slider
- Why can’t I display attachment_image_src with Custom Size?
- Use full size images in a specific gallery
- How to reduce the image size inside an icon? [closed]
- Custom shortcode being executed when saving page in wp-admin
- Change appearance of shortcode text inside editor
- Shortcode outputs at the top of the_content
- Escaping quotes from shortcode attributes
- Short code to display a loop
- How can I just get content inside a shortcode or just outside
- Custom Shortcode AJAX 400 Bad Request
- WordPress core responsive video not working with shortcode
- Ajax not returning anything on form submit
- Wraping $content into link with shortcodes
- Simple contact form with field validation
- Remove empty p-Tags in Shortcode content before non p-Tags
- What is a short code?
- Using do_shortcode with variables?
- Using ACF field in do_shortcode()
- Remove hyperlink on gallery shortcode
- Wrap shortcode inside custom block
- Instagram URL is converted into oEmbed
- Shortcode with no attribute but has value
- Remove wpautop from specific shortcodes only
- Combining similar shortcode functions?
- unwanted P tags in shortcode, delay wpautop not working
- Shortcodes and a list of IDs?
- Shortcode adding plugin output before post, instead of inline [duplicate]
- How to build a shortcode which can insert a query string into a DB table
- What is the Correct way to pass parameters in function
- Shortcode – Getting Categories appears on top of website
- Visual Composer integration [closed]
- How to Modify WordPress Default Image Gallery Shortcode
- Passing html tags as shortcode parameters
- no content after shortcode
- Button Shortcode
- Turn off image captions in gallery view?
- Shortcodes in excerpts returning empty string
- add_shortcode to capture URL screenshot not loading correctly
- Scripts for shortcode: concatenate or load separately? [closed]
- Print shortcode in defined area
- WordPress shortcodes are not working
- How to use/enable Pagination?
- Wrap Shortcodes and wpautop
- Placing tags on wordpress visual editor using shortcodes
- Shortcode called twice
- Favorite websites with shortened hyperlinks
- Best way to find all shortcodes that come with WordPress
- Using Variables in Shortcodes
- Default Attributes in Shortcode Not Working
- Replacement for gallery_shortcode function not taking all attributes
- Shortcode syntax errors
- Passing variable in nested shortcodes
- Shortcode Always Displays Default Attribute Value
- how can i pass this attribute in this shortcode?
- Display a form partially with a shortcode
- How do I fit a function inside an opening and closing do_shortcode
- Modifying the wordpress login page and then referencing it with a shortcode problem
- How to make shortcode which returns HTML?
- Render shortcodes with get_post_custom
- Add shortcode within the_content()
- How to create a custom shortcode for custom login form?
- Enclosing Shortcode not working in a Template
- Set redirect for need login
- make user_id in a shortcode dynamic based on who’s logged in
- pass complex json as shortcode parameter
- Image Caption Shortcode Broken upon update
- Shortcode not working in CPT taxonomy
- wp_enqueue_scripts does not work on admin page
- How to embeded shortcode for another website
- To know whether insert shortcode in custom meta box
- Execute shortcode in backend
- Shortcodes not working in custom page
- Get label in user meta query
- Shortcode not being executed
- Video Short Code and Media Fragments URI
- create a shortcode for embedding google map in a page
- How to fix transparency in product sliders / featured products on home page?
- Caption Shortcode: what filter to change the image size?
- Pull in excerpt with shortcode
- Short code format for cat tagging when posting from email
- How do I use “while” and “end while” inside of the echo do_shortcode with ACF Repeater?
- WordPress core playlist function not showing artist and album info
- Display title of child pages in shortcode
- Output html source tags inside shortcode
- How can I define the output of shortcode attribute value?
- What is the best way to include a template file within a shortcode?
- Shortcode templates
- Create plugin/function to catch XML-data via Shortcode
- Why My slider shortcode display above header
- Does anyone recognize shortcode ig_special_heading?
- How to scroll to a shortcode-generated anchor
- add post type pram to wp shortcode
- Shortcode conversion to hrml when post is published
- Shotcode error on functions
- Shortcode for displaying the user’s first name?
- Can I prevent wordpress adding and tags to autoembeds
- Shortcode – Display inline icon before text [closed]
- Why does my shortcode query not working with search term