Attaching images to posts vs displaying them in the posts
-
Hi!
I have the following doubts about attaching images to posts and displaying them in posts.
If we do not upload an image (image.jpg) directly through the Media Library but through a specific post (Post Sample), such an image is added to Media Library and automatically attached to this post.
In this case, we get the following Attachment Page:
https://domain.com/post-sample/image
But we can first upload the image into Media Library, forgetting to attach it to the post. Next, we can add such an image to the post from Media Library.
In this scenario, the image will stay unattached to the post.
In this case, we get the following Attachment Page:
https://domain.com /image
The matter is more interesting when we activate any plugin which allows redirecting the Attachment Page to the Attachment Parent (For example All in One SEO).
In the first case, the Attachment Page will be redirected to Post Sample, in the second case the Attachment Page will be opened.
I checked that we can even display an image in one post (Post Sample 1) and attach it to another one (Post Sample 2).
Could someone explain to me why WordPress works like this and what is the aim of that?
First question is why Wordpres allows having an image in the post without attaching it to this post?If we activate redirecting the Attachment Page to the Attachment Parent we can find that some Attachment Page is not being redirected to post (as being in the post does not mean it must be attached to it).
In some cases (if I make mistake) they can be redirected to the other posts in which they are not displayed.What is the proper way of working with images we want to attach to posts/pages?
regards,
Grzegorz
- The topic ‘Attaching images to posts vs displaying them in the posts’ is closed to new replies.