Why do wordpress use image attachment post instead of image url? How to insert an image into a post without linking to the attachment page?
Ah, you have discovered attachment. The WordPress software automatically creates an attachment page every time you add an image to a post or page, and is essentially a separate page on your site just for that image.
WordPress creates attachment pages for every media upload. By default the attachment post type is also public, which means they have frontend posts that are accessible on your site.
WordPress why are image permalink attached to post?
The image permalink format is yourdomain.com/image. When you upload the image directly to the post, the image permalinks becomes website.com/category/post-name/image-name.
When a file is added using the Add Media button on the post editing page, it automatically becomes an attachment for that specific post. If a file is instead uploaded directly onto the Media Library, it isn’t considered attached to any pages. When posts are deleted from WordPress, media that was attached to them can be unattached.
Besides, an image can be used in multiple posts, or has no parent posts (if it’s uploaded to the library directly).
An attachment is a specific type of media file that gets linked to a particular WordPress post or page.
What is an Attachment Page?
In WordPress, an attachment page is a dedicated page that displays all the information about a particular attachment. This page usually contains the attachment’s title, the date it was published, any captions or descriptions you may have added, and the file itself.
An image permalink is based on the image filename minus the file extension.
When you go to the image permalinks, it redirects to the image URL of yourdomain.com/wp-content/uploads/image-name. This is the default behavior in new WordPress installs.
As of WordPress 6.4 release of of October 2023, all images permalinks will now redirect to the image file URL.
How to edit the front part of the media image permalink which has the category and post name?
You detach the image and the slug becomes as if you have directly uploaded the image into the media library.
Can I prevent WordPress from assigning permalinks to images?
No you cannot… This is the core WordPress behaviour as of current.
How to make image on upload wordpress permalinks as alphanumeric numbers?
Use this plugin Disable Media Pages
WordPress bulk de-attach images plugin?
None….