wordpress image attachment

WordPress image attachment is a little complicated thing. In a post that is inserted an image attachment, you can edit some attributes like alt text, height, width of the inserted image. This editing won’t change the image itself, but change the corresponding attributes of the <img> element in the post. If you click the pencil icon on the editor menu of the image block, you can edit more attributes about the image including Alt Text, Title, Caption, Description on the pop up “Select or Upload Media” window and the “Media Library” tab. The Alt Text is still to be the alt attribute of the <img> element, but the other attributes Title, Caption, Description are not part of the <img> element. The Caption attribute forms the inner text of the <figcaption> element below the <img> element. The other two attributes Title and Description, however, do not occur in the post that the image is inserted into. So what are Title/Description used for?

Click the “Edit Image” link on the popped up “Select or Upload Media” window, you will edit the attachment itself like in a normal post. Here you can edit the Title/Description like editing the title/content of a normal post. Besides, you can change the Alternative Text/Caption of the image. But unlike editing post which means changing the content of a post, editing an image means changing the pixels of the image. So here you can find new menu items to actually change the appearance of the image like cropping, rotating, etc. If you do some editing and click the “Save” button beneath the image, new resulting image files will be generated in the upload directory of WordPress. Click the “Permalink”, you will see the web page for the attachment(not the webpage for the post that contains the image), and the image on that page is updated.  However, the other elements such as the title/description of the attachment web page won’t change until you click the “Update” button, which is exactly the same as you are editing a post.

The post that contains the image, however, won’t change. It still refers to the old image, old alt, and old caption.

 

 

Did you like this?
Tip admin with Cryptocurrency

Donate Bitcoin to admin

Scan to Donate Bitcoin to admin
Scan the QR code or copy the address below into your wallet to send some bitcoin:

Donate Bitcoin Cash to admin

Scan to Donate Bitcoin Cash to admin
Scan the QR code or copy the address below into your wallet to send bitcoin:

Donate Ethereum to admin

Scan to Donate Ethereum to admin
Scan the QR code or copy the address below into your wallet to send some Ether:

Donate Litecoin to admin

Scan to Donate Litecoin to admin
Scan the QR code or copy the address below into your wallet to send some Litecoin:

Donate Monero to admin

Scan to Donate Monero to admin
Scan the QR code or copy the address below into your wallet to send some Monero:

Donate ZCash to admin

Scan to Donate ZCash to admin
Scan the QR code or copy the address below into your wallet to send some ZCash:

Leave a Reply