How are such galleries implemented?
Good day. There is a page with fields for adding images and text, after clicking the "Submit" button, a post is created in WordPress.
When you select an input with a picture, it is loaded, the image is processed and the handler issues the url of the image for the preview. But there is a BUT. If a person leaves the page without clicking the submit button, then the images he uploaded, the previews were created, but they remain not attached to the WordPress post and eventually take up extra space. How are these tasks solved?
Sessions, temporary storage of previews (base + files).Anonymous
To place the code, please use CodePen or similar tool. Thanks you!