WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 1 down vote accepted

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

enter image description here

share|improve this answer
Wow... I feel stupid for having asked this. – AndrettiMilas Dec 3 '11 at 5:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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