Post slugs and images cannot have same name?

WordPress uses the attachment filename to create the attachment post slug.

If your file was named something else, there would not be any conflicts.

If you have your post permalinks set to /%postname%/ , and you upload an image FIRST, and then create a post SECOND, then WordPress has to make a choice between the two when someone tries to access the Permalink.

To solve the issue, you would either have to change your permalink structure OR change the name of either the post or the attachment.

Leave a Comment