When I insert an image into a post and link to that image, the link is sending me directly to the file rather than displaying the image via my image.php template. How can I solve this? I haven't been able to find the solution online.

This is not a problem with my [gallery] shortcode, which is bringing me to image.php - just with single images.

1 Answer 1


While inserting the image into the post make sure the Link URL is set to Post URL.

enter image description here

  • Wow... I feel stupid for having asked this. Dec 3, 2011 at 5:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.