This is a long-form post based on a previous Mastodon thread by yours truly

I've recently written a review of Teslagrad, a videogame which among its most striking features has beautiful art. Despite this, I have not included a screenshot in the review. While at first it was just a matter of convenience —I had not taken any while playing the game, and wasn't sure if I would have had to restart from scratch to get some good ones— the screenshots are still missing despite me having actually finally taken some.

As I've originally discussed in this Mastodon thread, this has not been an easy decision, and although I may come back to it in the future, it would require me to rethink my ideas on the design of the Wok.

Since its inception, I've endeavored to make this website as lightweight as possible —or at least to maximize its “content to weight” ratio: until recently, posts have almost exclusively been text-only, except for the sporadic self-hosted and often hand-coded vector graphic (feel free to browse the tag here to find more examples).

In the rare cases when raster images were included, they were hosted elsewhere, which has in fact been a source of issues due to the unreliability of said external hosting (expectedly) (You can find an example of missing image which I haven't bothered to fix yet on this page.)

To avoid this kind of issues, I've started revisiting my stance on image inclusion and hosting. Taking the thing possibly to the other extreme, I've decided that when adding my own (raster) images to a web page, these should also be tracked in the same source-control repository through which I manage the whole website.

This isn't strictly necessary, since , which I currently use as static site builder, has the concept of “underlay” that can be used to fetch site contents from outside the repository, and this would allow me to keep the repository lightweight (more so than the website at least). Tracking the images in the repository, on the other hand, has the advantage of keeping everything together, would avoid issues with having to rebuild the website safely if anything were to happen to the machine hosting it, and possibly most importantly (and most relevant to the discussion at hand) it encourages for images the same “content to bytes” maximization spirit that has driven my text usage so far.

One of the ways in which I would like to minimize disk usage is using JPEG XL instead of (or even , but I'm not currently hosting JPEG images), which I cannot do as long as Firefox doesn't enable JPEG XL support in the mainline edition of its browser (no, I don't care that has decided to boycott it in Chrome, just like I haven't cared about their lack of support and proper animation support for years).

The way I've approached this so far has been to store both the JPEG XL and PNG version of the image in the repository, using the picture and source HTML tags to provide the JPEG XL version as primary and the PNG version as fallback —which hasn't been that bad in terms of storage because the worst offender is a PNG which is ~134KB in size.

Fun fact: at 134KB, that image is only the third-largest file in the repository (yes, there are two text files that are larger than that; yes, I can be a heavy writer; no, they have not officially been published yet; yes, I may split them before publishing), and even lower in rank when considering the rendered pages, due to how my category and home pages are built. So an image of that size is still … acceptable.

And here we come at the issue with my Teslagrad review: as mentioned, one of the strong points of the game is its beautiful art, and showing it would be best, but showing it needs way more bytes than anything I've added to the Wok so far.

I've (re)played the game in its “Game Plus” mode that is available after a (perfect) win, just to take some screenshots to include in my page (I would actually like to include three or four of them), but it turns out the screenshots I've taken are huge, so adding them would be an enormous (pun intended) change in the website presence.

Let's put something out of the way instantly: yes, it's at least partially my fault for gaming in 4K (3840×2160, that's 8.3 megapixels, or 25MB of uncompressed, 8-bits-per-channel raster images). The numbers below would easily be lower if I had taken “FullHD/1080p” screenshots (1920×1080 pixels, exactly 1/4th of the 4K), but the following argument wouldn't change much. And most importantly, the web is full of screenshots at “regular” resolutions, mine would provide nothing other than being “mine”, and while that might have some value for me (but not even that: my ego feeds on other things), they still wouldn't be worth the extra space.

The screenshots I've taken so far are PNGs that range in size from 3.7MB to 6.8MB (26MB total for 5 images). pngcrush manges to squeeze between 200KB and 300KB per image, with a total reduction of the entire set of less than 1.5MB, down to a generously rounded 24MB.

By contrast, JPEG XL, true to its design goals, manages to shrink the whole set to around 16MB total with lossless compression (that's around 1/3rd smaller), or 4.3MB total with lossy compression at a “visual distance" of 0.5, and even down to 2.7MB total with lossy compression at the limit of “visually lossless” (i.e. with imperceptible loss of information), a “visual distance" of 1.0.

To give people an idea of why I'm resisting the idea of adding these to the post (and to the repository), the entire history of the Wok packs down to less than 3.2MB (that's the size of the .git directory). All source files (page sources, styles, templates and what little images are there) take up 4.3MB.

4 out of 5 of the screenshots take more space each than the entire current website source (other images included!). Adding both the PNG and lossless JPEG XL version of the 4 smallest images would more than decuplicate the website size. Even just adding the “1.0 distance” JPEG XLs would mean a 50% growth. I really don't feel like doing that. But I really think the Teslagrad review would benefit immensely from it.

(Fun fact #2: the rendered website actually takes up around 100MB, but around 80MB of that are just the tag directory, since each tag is its own subdirectory with an HTML, an Atom and an RSS file. The only other sections that take more than 2MB are the three most active categories: Oppure, Tecnologia and Riflessioni, in descending order, accounting for around 9MB of disk usage.)

So, under which condition would I be in a position to change my mind about this?

One possibility to solve the conundrum would be to write several megabytes of text. If I managed to get to approximately 60MB just for the textual part of the website, I could add a single screenshot to the review, since it would then occupy only 1/10th of the space. Actually make that 80MB, since I'd need both the PNG and JPEG XL version. (Keep in mind that these figures refer to the Wok source, since as mentioned above we're already in the “safe space” if we take the amount of space taken by tags in the rendered website.)

On the other hand, writing 60MB of text takes a lot of time, so maybe by the time I'm done I could do without the PNG version because all browsers will support JPEG XL (wishful thinking).

Jokes aside, this is actually a pretty good example of the difference in storage requirements for text vs images —and I haven't even discussed video yet (but that's extremely unlikely to happen on the Wok).

It has taken me 13 years of on-and-off writing to get to slightly over 4MB. At the same rhythm, it'd take me almost two centuries to get to 60MB.

I could probably cut that down to a tenth if I could dedicate myself full-time to writing, but that's, shall we say, unlikely to happen. And that's not for lack of ideas on what to write about either (as I assume people who follow me here or on the Fediverse have realized already, I can be very opinionated on a lot of topics, and verbosely so). But writing takes time, and I haven't even sat down to write about the things I've already planned to write about, due to a combination of factors that I'm not even going to bother to enumerate here.

I have fantasized from time to time about setting up a Patreon or something like that (most likely a Liberapay) just to see if anybody would actually back financially my ramblings about whatever topic I decide to write about, but let's be serious for a moment here: would any of you readers of mine actually shell any money to ensure I write more often? I'd probably get luckier with the opposite endeavor!

But let's just say I'm glad I have a steady job that pays the bills, even if it does leave me less time (and sometimes willpower —maybe let's just go with spoons?) to ramble —even assuming I'd use the extra free time for that rather than to, say, play videogames all day.

To be completely fair, it's also true that these days I've been writing more consistently from my Mastodon account than on the Wok, (I've discussed some of the reasons for this here), and while my “rate of production” of text on that platform is higher, it's still not enough to put much of a dent on the byte count.

I've run some numbers (in fact, compared to my original Mastodon thread, I've run some more recent numbers, which will be the ones presented here). Before setting out to write this article (or to port the original Mastodon thread, if you prefer) I've downloaded a backup of my primary Mastodon account, so while this will not be up to date with when I finish writing the article, it's fresh enough to merit discussion.

The full archive is a 183MB gzipped tarball. Uncompressed, it gives a directory that takes up 271MB. Most of it is (again unsurprisingly) is taken by the media attachments, that account for around 170MB. The next largest file is the outbox, which holds a representation of every contribution I've made to the Fediverse: 98209 objects (at the time of the backup) among which 80646 boosts/​reblogs and 16583 posts (plus other stuff that I haven't bothered to look into yet).

I'm a heavy booster, but for the topic at hand we only care about the actual posts I wrote. The JSON format is extremely verbose, but using FediRender, which I discovered for the occasion, it's possible to obtain a more compact HTML rendition of one's outbox, limited to the actual posts (which happens to be exactly what we are interested in).

In my case, the produced HTML takes almost 10MB, which —while significantly smaller than the original 86MB JSON (which to be fair contained much more data)— is still surprisingly large.

In the original thread I had miscounted down to around 110KB, which would actually be the number of lines, not characters.

Arguably, 10MB for nearly 17K posts isn't even that much: given the 500 characters limit on my instance, that many posts could easily take 8.3MB if they were filled to the brim. Of course that's not actually the case. There's a lot of overhead even in the HTML file: dumping the content of the HTML file in plain text and stripping out the metadata such as dates and account names drops the whole thing down to less than 2.7MB. (For the curious, that's an average of approximately 160–165 characters per post, quite reasonable all things considered.)

So yeah, even if I added my entire Fediverse posting and commenting history to the Wok I wouldn't budge the current size of the website source enough to be able to add a multi-megabyte screenshot without changing the current balance —and that's still being extremely generous, since many of those posts are replies that wouldn't make much sense posted here anyway, extrapolated from the original threads. (Some of them might still be worth as starting point for more in-depth writing, but as shown by my article against federating with large proprietary networks there isn't always a one-to-one correspondence between Fediverse threads, be them stand-alone or in replies, and Wok articles.)

Still, it is true that my Fediverse writing rates are much higher: we're talking about something between 2 and 3 million characters in approximately 19 months (that's between 3400 and 5200 characters per day, or between 17 and 25 seconds per character), compared to something like 4 million characters over 13 years (that's around 850 characters per day, or 102 seconds per character), and that's just looking at my primary Mastodon account. But is this enough?

(Fun fact #3: I have committed something to the Wok every year since starting the project in 2010. I don't have detailed statistics at hand, but the least active years were 2017, 2018 and 2022, at least looking at commit frequency.)

If I were to write on the Wok at the rate at which I write on the Fediverse, it would still take me no less than 60 years to add those 80 million characters of textual source that would allow me to post one screenshot and keep things balanced, but I don't think anything like that is ever going to happen.

(Fun fact #4: by the numbers seen so far, a losslessly compressed 4K picture may be worth months if not years of writing —way more than a thousand words!)

What I do plan on doing (but that's independently from the screenshot thing) is to “port” more of my threads to the Wok, in the spirit of PESOS. I try to keep the Wok in line with the longer Mastodon threads, but I know I have missed some. I may even go as far as working on some improvements to the rendering of Mastodon threads, to give me a better idea of what I have and have not transcribed yet.

(Fun fact #5: the source for this article is nearly two times larger than the original Mastodon thread.)

(Part 2 of this series is available now.)