Skip to content

Please add an option -> pass text to gallery image alt attribute #2536

@camenduru

Description

@camenduru

def get_images(jpg_path):
    images = []
    for jpg_image in os.listdir(f"{jpg_path}"):
      try:
        images.append((f"{jpg_path}\\{jpg_image}", f"{jpg_image}"))
      except Exception as e:
        print(f"{jpg_path}\\{jpg_image}", e)
    return images
gallery = gr.Gallery(label=gallery_label, show_label=True, elem_id=f"ats-gallery-{prompt_path}-{jpg_path}").style(grid=[5], height="auto")
btn.click(get_images, txt, gallery)

I can pass image label like this images.append((f"{jpg_path}\\{jpg_image}", f"{jpg_image}")) but not image alt please add an option and I think img alt is super important for data science and seo "thank you for coming to my ted talk" 👏👏👏

full code here https://github.com/camenduru/stable-diffusion-webui-artists-to-study

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestgood first issueGood for newcomerssvelteFrontend-related issue (JS)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions