belaviyo / save-images

Save loaded images in nested iframe pages
https://webextension.org/listing/save-images.html
264 stars 62 forks source link

Feature Request: File renaming based on img HTML attributes #23

Closed shane64 closed 4 years ago

shane64 commented 5 years ago

Hello,

Would it be possible to permit more options (in square brackets) in the "File Mask" section of the UI to allow drawing on other attributes in the original "img" tag if they exist (like "alt", "class", "title") to construct the image filenames? Perhaps to avoid hard-coding all possible attributes, the user could provide something like [att=title] or [att=alt] as part of the "File Mask" (and silently fail if that particular attribute doesn't exist)?

Thanks.

dimeptr commented 4 years ago

In the following patch I have added the possibility to use the alt attribute for renaming of files alt-keyword.diff.txt

belaviyo commented 4 years ago

Thanks @shane64 for the feature request and thanks @dimeptr for the implementation.