Upload Images:
Drag and drop photos onto the page (for desktop) or click the upload button to select images from your device.
Optionally, you can select images by clicking on the heart-shaped grid placeholders, but this functionality is not directly implemented in the provided code.
Randomly Fill:
Click the "Randomly Fill Images" button to automatically fill the grid with the uploaded images in a random order.
Alternatively, drag and drop uploaded images into specific grid slots to place them manually.
Move Images:
Within the grid, long-press (or click and hold) an image and drag it to move it up, down, left, or right.
The provided code does not directly support copying images between grid slots by long-pressing, but you can achieve a similar effect by dragging and dropping.
Generate Puzzle:
After filling the grid with images, click the "Generate Puzzle" button to see a preview of the images arranged in a heart shape (this is a simplified version; actual heart shaping would require more complex logic).
Download Puzzle:
If you're satisfied with the preview, click the "Download Puzzle" button to save the image as a PNG file to your device.