ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: emanuele on April 16, 2014, 12:15:52 am

Title: Posting Images with limits
Post by: emanuele on April 16, 2014, 12:15:52 am
This "bug" exists probably since forever.
Set limits to image width or height, then try creating a post with this code:
Code: [Select]
[IMG]http://stream1.gifsoup.com/view/294143/scared-o.gif[/IMG]
Here on that server I get a 404 because probably the server times out (or something like that).

Obviously the problem is that Elk tries to determine the size of the image, but because it is rather big, it fails and php gives up.

Alternative solutions?
CSS looks the best: a max-width and a max-height set in html_headers should do the trick pretty well without forcing php to download tons of stuff. This would also eliminate the oddity to have different max-sizes depending on settings changed over the time.
Title: Re: Posting Images with limits
Post by: ahrasis on March 28, 2019, 12:56:11 am
Has this been attended to?
Title: Re: Posting Images with limits
Post by: emanuele on March 31, 2019, 10:56:20 pm
Easy peasy, let's try:
(https://www.elkarte.net/community/imagecache.php?image=http%3A%2F%2Fstream1.gifsoup.com%2Fview%2F294143%2Fscared-o.gif&hash=117f846b6547e097c28437fdcb3535a6" rel="cached" data-warn="External image, click here to view original" data-url="http://stream1.gifsoup.com/view/294143/scared-o.gif)
Title: Re: Posting Images with limits
Post by: emanuele on March 31, 2019, 11:04:27 pm
I think it has (somehow) been fixed (or at least made it not relevant).
But it may just be that the website of the gif above is down at the moment... dunno.

To rested when gifsoup.com comes back online.
Title: Re: Posting Images with limits
Post by: Spuds on April 01, 2019, 10:16:47 pm
I think its being masked in this example due to the image cache addon.

I'd suggest maybe logging this on github for 2.0.  I already changed a bunch of stuff in 2.0 for how image sizes are determined, so I *may* have be accidentally fixed in 2.0 but it should be checked.