Kentico image attachment error

Stephen Herz asked on August 19, 2016 03:46

I'm using Kentico v9

I have a content only Page Type with a Rich Text field. The user edits the text and using the toolbar, clicks the image icon to add an image. They choose a file. It uploads the image, but the link created causes a 404 error. I can see the image listed in the Properties/Attachments list, but trying to browse the image gives a 404. Interestingly, I can edit the photo and it will appear in the edit screen so I know the image upload was successful.

The link that is automatically embedded in the HTML is /getattachment/folderPage/imageName.jpg

I've seen some others with a similar issue, but none of those solutions seemed to work.

Any help will be appreciated.

Correct Answer

Chetan Sharma answered on August 19, 2016 06:22

I usually don't follow this approach for precisely the problem you are facing.

There are two things you may check

  1. Configure extension-less URL like [this] (

    <modules runAllManagedModulesForAllRequests="true">

  2. Prefer to to upload all attachments that you want to use first in media library and then use reference in your article. This way it is easily accessible across multiple places and easy to migrate using content staging.

2 votesVote for this answer Unmark Correct answer

Recent Answers

Jeroen Fürst answered on August 19, 2016 09:58

Hi Stephen,

Have you tried it in the latest hotfix? I believe there are some nasty bugs in early versions of 9 which resolved it for us.

Alternatively you could try to use permanent URLs for images. You can enable this in the settings (Content --> Media).

Hope this helps. Jeroen

0 votesVote for this answer Mark as a Correct answer

Stephen Herz answered on August 19, 2016 17:16

I saw this fix in a previous post but had put the modules statement in the wrong <system.webServer> tag, which caused it to break.

Chetan, thank you for the fix and the link to the documentation. Jeroen, I was already on the latest hotfix, that was the first thing I tried. Thanks for your help too.

0 votesVote for this answer Mark as a Correct answer

Rananjay Singh answered on August 24, 2017 13:39 (last edited on August 24, 2017 13:43)

I have faced similier issues, I have added below code with in web.config ##<modules>## section. <modules runAllManagedModulesForAllRequests="true">

Finally it's worked for me.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.