Skip to content

Adding Caption Field Below Image Preview in FileUploadWithPreview #85

@rafig256

Description

@rafig256

Hi,

First, thank you for this great library—it’s been really helpful! I’m trying to add a text input field under each image preview that acts as a caption (or alt text) for the uploaded images. Ideally, the caption field would appear automatically below each image preview as soon as a new file is selected and displayed.

I’ve tried various approaches, including adding an event listener to detect when an image is added, but I haven’t been successful in reliably appending the caption field directly under each preview image. Could you provide some guidance on the best way to achieve this, or if possible, share an example code snippet?

Here are the main points of what I'm looking for:

A text input (for caption/alt text) should appear under each image preview.
The caption field should be linked to the specific image in the preview so that multiple uploads have their own captions.
Thank you in advance for any help you can provide!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions