Use EXIF data of image to prefill image description
During attachment upload Pleroma returns a "description" field. Pleroma-fe has an MR to use that to pre-fill the image description field, <https://git.pleroma.social/pleroma/pleroma-fe/-/merge_requests/1399> * This MR allows Pleroma to read the EXIF data during upload and return the description to the FE * If a description is already present (e.g. because a previous module added it), it will use that * Otherwise it will read from the EXIF data. First it will check -ImageDescription, if that's empty, it will check -iptc:Caption-Abstract * If no description is found, it will simply return nil, just like before * When people set up a new instance, they will be asked if they want to read metadata and this module will be activated if so This was taken from an MR i did on Pleroma and isn't finished yet.
This commit is contained in:
parent
75f912c63f
commit
cd316d7269
11 changed files with 219 additions and 14 deletions
BIN
test/fixtures/portrait_of_owls_caption-abstract_tmp.jpg
vendored
Normal file
BIN
test/fixtures/portrait_of_owls_caption-abstract_tmp.jpg
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 936 KiB |
BIN
test/fixtures/portrait_of_owls_imagedescription_and_caption-abstract_tmp.jpg
vendored
Normal file
BIN
test/fixtures/portrait_of_owls_imagedescription_and_caption-abstract_tmp.jpg
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 936 KiB |
BIN
test/fixtures/portrait_of_owls_no_description_tmp.jpg
vendored
Normal file
BIN
test/fixtures/portrait_of_owls_no_description_tmp.jpg
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 936 KiB |
Loading…
Add table
Add a link
Reference in a new issue