You are reading a single comment by @slippers and its replies. Click here to read the full conversation.
  • It seems like it parses it from the image data itself, so a 49% failure rate is bonkers

    Yeah, I'm unsure why that would be, I keep Go and all of the dependencies up to date and so I expect that this would just work.

    I started recording dimensions on day one, as most of what you describe is what I wanted to do. I just never had quality in the data to do it.

    I wonder if there's an Nginx plugin for image resizing and reporting dimensions... because I could always come up with something convulated that used that, i.e. created thumbnails via an inline request to a reverse proxy, and then reported out the new dimensions, and saved those back to the database for subsequent views.

  • That does indeed sound complicated and not worth the effort!

    If you can share a couple of examples of image attachments that couldn't have their dimensions parsed, I can run some tests to see if there's anything else going on if you'd like?

  • Oh God... it's worse than I thought... no wonder it didn't work.

    • image/tiff
    • image/svg+xml
    • image/x-ms-bmp
    • image/x-portable-pixmap
    • image/x-nikon-nef
    • image/x-matroska

    That last one sounds like it's a video not an image... most are unsupported by anything, and some are custom.

    This is 15 out of the last 50 attachments... but there are some PDFs and other things in there and it doesn't mean a third of images based on the most recent sample.

    It just means it's not garbage per se... it's just unsupported by a library that focuses on a tiny number of most common image types.

About

Avatar for slippers @slippers started