In the text of the post added pictures?

Good evening,
Can you tell how you are adding images in the text of the post.
If you look at this editor there is a button Above the download images clicking on which we choose a picture from your computer and after downloading the generated code like that.

<!--<img src="https://habrastorage.org/webt/5c/a0/d3/5ca0d3f788892035859820.jpeg" alt="image"/>
-->
And the question here.
If the post is deleted how deleted those pictures which I added in post. Because the picture is not connected with the post.
How to make so when you delete a post and deleted all the pictures. How to make a connection with them . Or how did this happen? Tell me is very necessary.
March 19th 20 at 09:25
1 answer
March 19th 20 at 09:27
Solution
When you upload an image, you save it in the database. There is stored the address of the file and other information, among which is the ID of the question to which this picture is loaded. Deleting a question to delete all records from the database and all relevant files
Now I understand how it's done. Thanks for the tip. - jeremy commented on March 19th 20 at 09:30

Find more questions by tags Web Development