View Single Post
Old 11-15-2020, 12:49 PM   #4871
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,030
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
New Test Version Posted

2020-11-15
- Add (optional, default on) convert support for data:image in-line <img>s.
- Add pass-through support for data:image in-line <img>s.
- Set default cover_min_size: 10,10 to avoid spacer images as covers.
- XenForo: Fixes for extra /s in some normalized post URLs.

This one is more 'test' than usual; especially for XenForo sites. You might want to save your previous installed version.

HTML can include images 'in-line', where the image data is encoded and included directly in the HTML. In past, FFF has handled this case... poorly.

Now, if it can, FFF will convert the in-line images to file images so that FFF's image processing can be applied and duplicate images shared. Since the first example given was a case of a 1x1 'spacer' image, I also set cover_min_size to default 10,10 now.

(This change was inspired by #596, but doesn't directly address the issue raised.)

While 'on' by default, it can be turned off--and in-line images will only be converted if base64 encoded. If you have examples of other encodings used 'in the wild', please let me know.

Code:
## In-line images (<img src="data:image/...;base64,...") are converted
## to files so the normal image processing can be applied, but only if
## base64 encoded.  Note that in-line images are also removed when
## include_images:false.  Also allows for in-line image to be cover.
## If set false, in-line images will be kept as-is.
convert_inline_images:true
Note that there isn't an option to go back to the old behavior; it was that broken. However, if enough people desire it, I could add a "don't include in-line images at all" option, which would be roughly equivalent.
JimmXinu is offline   Reply With Quote