Re: Forum Message Attachments
Reply #1 –
It can be useful for sharing e.g. UserJS and UserCSS. Also see
this topic on the testing board.
You'll notice the allowed file types reflect this intent: "Allowed file types: css, js, py, odt, xlsx, txt, tar.lz, zip". (PS I've now changed that to include PNG and JPG.)
That being said, properly crafted screenshots can usually remain quite small.
A screenshot of your comment is 16kB in PNG. Subsequently running pngquant gives a 6.2kB result with no discernible loss in quality. A libjpeg optimized JPEG looks alright at 14-18kB, but it has some relatively minor artifacts. You can easily reach about 6kB with JPEG as well, but the artifacts then become really distracting to the point where it looks more like one of those illegible CAPTCHAs.
These results indicate that the system should check how filesize compares between e.g. carefully crafted PNGs and its own low-quality JPEGs, otherwise it shoots itself in the foot. For that matter, it really shouldn't add another layer of noise to a properly optimized JPEG either. In the past I've uploaded a JPEG to Facebook, which consequently made the file bulkier and uglier.
Above all, however, this blog is not Facebook. Like I indicated before, screenshots are doubtless the primary use case, not photos. I'd say simply reject all images over 200kB, or possibly even as little as 50kB. Give some pointers about how to optimize files, but don't let the system muck about with it. I know, tough love, but I see no added value in shrunk low-quality JPEG images.
From:
http://blogs.opera.com/desktop/2013/10/welcome-to-the-new-home-of-desktop-blog/#comment-1106162856There's some stuff to think about here. When I wrote that, I had no idea Opera would be tossing out most of their forums, although given the lack of updates I wasn't expecting the My Opera mail to live on for much longer.
Realistically, 15kB is a bit harsh, but note that I was able to replicate
the screenshot in this post in under 15kB using the methods described in my quote above. I'll probably double the limit to 30kB per attachment.