Finding image attachment IDs for using gallery shortcode

  • Author
  • #523391


    This is a problem I’m having with my private blog. I am trying to use gallery in a post by using the shortcode feature to select which images to include or excluse from the gallery display. The documentation says you can do this by specifying the attachment IDs as an argument to the command. Trouble is I can’t figure out what the attachment IDs are. Documentation says:

    “Note: To get an attachment ID for an image, go to your Media Library and hover over the image title you want to exclude. You can find the ID in the URL (the number after attachment_id=).”

    But! When I hover over an image title in my Media Library what I get is “Edit Image”. Also the image URL appears to be made up of the image title, not a numeric ID.

    Anyone else run into this and solved it? Or should I throw myself at a Happiness Engineer? ta! Heather

    The blog I need help with is


    Go to your media library in the dashboard, hover your mouse over the thumbnail image at left, look down in the very bottom edge of your browser window and within that URL you will see

    id=xxx where xxx is the id number of the image.



    The Happiness Engineers are safe now. (Yes, really. Honest. It’s OK to come out of the cupboard….) Many thanks!


    You are very welcome.


    I just looked and the support document could be a lot more clear on where exactly to look for the ID.

    I’ll send a note to staff on this and hopefully they will clarify it.

The topic ‘Finding image attachment IDs for using gallery shortcode’ is closed to new replies.