Broken images....

Posts

Clickbait wrote
RX14 wrote

Looking at the logs hasn't really shed any light on anything, and debugging anything which can't be reproduced is basically impossible, so I might end up writing my own camo proxy in crystal.

Think it could be something to do with CF?

Like, what if the image hasn't finished downloading on our server, so it displays a 404 or something? and then cloudflare caches it?

Seems like odd practice to cache a 404.

FukuchiChiisaia wrote

Works 'kay on my PC. Try upload to different host 🙂

Image host doesn't seem to make any difference.

Clickbait wrote
RX14 wrote

Looking at the logs hasn't really shed any light on anything, and debugging anything which can't be reproduced is basically impossible, so I might end up writing my own camo proxy in crystal.

Think it could be something to do with CF?

Like, what if the image hasn't finished downloading on our server, so it displays a 404 or something? and then cloudflare caches it?

In my experience the problem usually goes away after a refresh actually,.

a month later

I have just deployed a new image proxy for lewd.sx, written in crystal. It's open-source and available here. This is the first part of lewd.sx to be written in crystal (yay!)

If you see any image errors, you can open the image in a new tab and get a descriptive error message of why the request failed. Usually, it will be because the original URL went missing and is no longer returning an image. If you are sure the original image URL is valid, reply to this thread with the proxy.lewd.sx URL and I'll debug it for you.

7 days later

Images seem to be spotty for me again. Anyone else been having this issue?

Backlash wrote

Images seem to be spotty for me again. Anyone else been having this issue?

The thing seems to fall over every so often. I'm adding graphing of stats to try and debug.

RX14 wrote
Backlash wrote

Images seem to be spotty for me again. Anyone else been having this issue?

The thing seems to fall over every so often. I'm adding graphing of stats to try and debug.

I'm noticing a socket leak, so i've set it to restart every 2 hours. I'll try to get a more permenant fix ASAP.

12 days later
tn5421 wrote

Line 6, /src/camo/config.cr

  getter length_limit : Int32 = 5 * MiB

Hmm, what an odd thing to have in the code :')
Though couldn't the proxy just redirect to the original link instead if the size is too big?

malmon wrote
tn5421 wrote

Line 6, /src/camo/config.cr

  getter length_limit : Int32 = 5 * MiB

Hmm, what an odd thing to have in the code :')
Though couldn't the proxy just redirect to the original link instead if the size is too big?

I'll increase it to 10MiB. Honestly, if your image is 5MiB or larger it's way, way too large already. In the future we'll probably control image embeds much more, at least on mobile, to ensure that loading a single forum thread doesn't eat your whole mobile data allowance.

RX14 wrote
malmon wrote
tn5421 wrote

Line 6, /src/camo/config.cr

  getter length_limit : Int32 = 5 * MiB

Hmm, what an odd thing to have in the code :')
Though couldn't the proxy just redirect to the original link instead if the size is too big?

I'll increase it to 10MiB. Honestly, if your image is 5MiB or larger it's way, way too large already. In the future we'll probably control image embeds much more, at least on mobile, to ensure that loading a single forum thread doesn't eat your whole mobile data allowance.

I added the PR like the sleazy fuck I am.

Probably a bit off topic, but is it possible to embed an image that bypasses the proxy? I want to put a dynamic image in my sig, but it'll be pointless if it gets cached.

Also, the 2nd image in my sig times out for some reason. It also doesn't show up in markdown files on GitHub.

being able to bypass the proxy defeats the purpose of having the proxy

Clickbait wrote

being able to bypass the proxy defeats the purpose of having the proxy

Fair enough, though I'm still not sure why my 2nd image is timing out. URL is

RX14 wrote
malmon wrote
tn5421 wrote

Line 6, /src/camo/config.cr

  getter length_limit : Int32 = 5 * MiB

Hmm, what an odd thing to have in the code :')
Though couldn't the proxy just redirect to the original link instead if the size is too big?

In the future we'll probably control image embeds much more, at least on mobile, to ensure that loading a single forum thread doesn't eat your whole mobile data allowance.

How much more though? Because even the current setup renders dynamic images useless.

18 days later
Backlash wrote

Can't see shit, cap'n. Y'all workin' on the image proxy again?

I feel like this feature has caused more problems than it has solved

malmon wrote
Backlash wrote

Can't see shit, cap'n. Y'all workin' on the image proxy again?

I feel like this feature has caused more problems than it has solved

We'd need the feature either way, it's just that this new implementation seems to be subtly broken. I don't know why it's broken because it's essentially impossible to reproduce, but i've made sure to fix the reboot every 2h feature.

10 months later

Am I the only one getting more broken images? I've had to shelve at least two posts just 'cuz I couldn't include the images that went with. :c

Backlash wrote

Am I the only one getting more broken images? I've had to shelve at least two posts just 'cuz I couldn't include the images that went with. :c

>more

They're pretty much all ded on my end. Except for sigs.