@email@example.com (#g3th6hq) I actually never wanted to see stuff like that. But alright, let’s keep it for now. XMP, so many things I’ve never heard of. ;-) XML is so much bloat for so little actual information. It amazes me every time.
@prologic (#g3th6hq) Okay, I had a look at the image code and noticed, that we don’t support JPEG. When requesting an image using Accept: image/jpeg, a PNG is delivered instead. Locally converting the PNG to JPEG using convert, results in a much smaller size. I used @off_grid_living’s solar panels https://twtxt.net/media/xpdN2Zg3WrZCLAhBo4Wu2U and got the following file sizes: 312.5 KiB PNG, 214.5 KiB WebP and 76.8 KiB JPEG. For photos, JPEG’s savings are quite significant. EXIF information are stripped when uploading an image, which is fine to me, @firstname.lastname@example.org would disagree on that. ;-) Maybe the hardcoded maximum image resize width of 720 px would be something to make configurable by twtd operators.
Regarding image/jpeg support. Originally I designed the image processing to only really support WebP and PNG, WebP if possible and a fallback to PNG. In hindsight maybe JPEG should be supported oto? It wouldn’t take a lot of extra processing to handle this.
In an ideal world, I’d refactor the code entirely into a separate service that accepts an image upload, returns a unique URI for the resource and does the processing in the background. So that the user experience is quicker and more fluid…
@prologic (#g3th6hq) No worries. I need to think about splitting the programs a bit more. Currently I’m trying to test your latest change regarding the configurable fetch interval. At the moment it looks like it’s not having any observable effect, but I’m probably doing something wrong. Back to testing.
@lyse @movq @prologic (#g3th6hq) Interesting comments Lyse. The image you speak of is 37.9KB, and I use James camera which makes a 6MB file. I than get the image in Windows 8 Photos viewer, and press Screen Shot, Paste the file into MSPaint, a primitive Paint program. I than use capture size to get the image again, and paint it again into Paint, unchanged. It is saved as a JPEG file, reducing the image from 6MB to 37.9 KB. The file is than used for Internet publishing on my website, spiritualsprings.org . It would be nice if software made image files smaller automaticly
@off_grid_living (#g3th6hq) That’s an interesting observation, that the source image is even smaller! Your workflow seems overly complicated to me. Isn’t there a resize option in this image viewer? Maybe get yourself a proper image viewer. When I was on Windows decades ago I used Irfanview, not sure whether this still exists. As for dedicated image editing in a GUI, I can recommend GIMP. I reckon ImageMagick is availabe on Windows as well, you could easily automate resizing with it in a script if you have the courage to use the command line: convert -resize 400x300 -strip -quality 50 ORIGINAL.JPG RESIZED.JPG is what I use.