diff --git a/src/microcosm/__init__.py b/src/microcosm/__init__.py index f9f96df..d9d2643 100644 --- a/src/microcosm/__init__.py +++ b/src/microcosm/__init__.py @@ -344,7 +344,12 @@ def process_multipart_post(): if "thumbnail" not in frontmatter: frontmatter["thumbnail"] = photo_url - frontmatter["photo"].append(photo_url) + if "mp-photo-alt[]" in request.form: + alt = request.form["mp-photo-alt[]"][i] + else: + alt = "" + + frontmatter["photo"].append({"value": photo_url, "alt": alt}) # docstr += f'\n\n'