Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Try2t-000848-K6 for pgsql-www@arkaria.postgresql.org; Sun, 06 Jan 2013 21:46:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Try2s-0001FX-OU for pgsql-www@arkaria.postgresql.org; Sun, 06 Jan 2013 21:46:18 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Try2s-0001FS-B2 for pgsql-www@postgresql.org; Sun, 06 Jan 2013 21:46:18 +0000 Received: from wg-in-x0229.1e100.net ([2a00:1450:400c:c00::229] helo=mail-wg0-x229.google.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Try2p-0000WY-S4 for pgsql-www@postgresql.org; Sun, 06 Jan 2013 21:46:17 +0000 Received: by mail-wg0-f41.google.com with SMTP id ds1so1681043wgb.2 for ; Sun, 06 Jan 2013 13:46:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-gm-message-state; bh=XkOymD82M6ZFKM8LllwcUupO02PXTmrT4FXI+eaNTKE=; b=iXDJhMrzQhJg6po8F4RH6tQW9kWRfSQxG2vgVYX5PaSDIfC7ENP46mdTJWruXSValD fp+r1ZScjTJNdzpKJoC88YxEu/cgl3/wL0kKHLxve2qTvcdONee4QsCgUqodncaxFvpp Ce99s4AZaRIPePW0O9xPREJWcP7CeCTB/DEgxVeKDsqbx0W0mPxLDI5dmX75lj4P8SIV STgoyvIjT7SFI4sCEysbSNQDiQQkcTwmG+Y86rqtFOjiqpmh98I0KN1x6TSN+q5pAHBX xoO6zqo1zZCy+R5Cyav+fKaCSDdvvLCbSbm1mpri8kPx86gcu4mnDdYANpLgQ3Pv0Drf 4tHQ== MIME-Version: 1.0 X-Received: by 10.180.107.130 with SMTP id hc2mr6254448wib.12.1357508773500; Sun, 06 Jan 2013 13:46:13 -0800 (PST) Received: by 10.194.104.41 with HTTP; Sun, 6 Jan 2013 13:46:13 -0800 (PST) In-Reply-To: <6904.1357507508@sss.pgh.pa.us> References: <18383.1357499527@sss.pgh.pa.us> <6904.1357507508@sss.pgh.pa.us> Date: Sun, 6 Jan 2013 22:46:13 +0100 Message-ID: Subject: Re: New archives for testing From: Magnus Hagander To: Tom Lane Cc: Greg Stark , Peter Geoghegan , PostgreSQL WWW Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQmgxLsH+lTlvs1ZjSVzZ3UF3py8x2eDeKrYP7Puc5Xbc50/WsjcbAn0t73ivswyK41/0RTv X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-www Precedence: bulk Sender: pgsql-www-owner@postgresql.org On Sun, Jan 6, 2013 at 10:25 PM, Tom Lane wrote: > Magnus Hagander writes: >> On Sun, Jan 6, 2013 at 9:59 PM, Greg Stark wrote: >>> I would be more concerned with the file size. You don't want someone >>> to be able to make an archive page send a hapless viewer a 100M image >>> file. Luckily file size doesn't require parsing the meta data. >>> >>> Can you not deal with the image size by just sticking a css attribute >>> for max-height and max-width on the inlined image? > >> That's certainly another option - limit it by size that way, and then >> limiting it by filesize for whether we include it or not. We can even >> give it scrollbars, I guess. That does make even more sense. > > A file-size-based limit on what we'll inline seems perfectly sensible > from here. As for scrollbars, if it's big enough to need those, we > probably don't want it inline ... Yeah, I was thinking scrollbars rather than cut. Turns out the max-width option actually rescales the image, so we're fine. I've applied a change that makes it now inline all images <75kb, and rescaling them down to 600 pixels wide if they are bigger. The example URL you used have been reloaded from the new code, so it shows what it looks like. Any other pages that had images on them that were already viewed are currently cached the old way, but will automatically update once they expire from the cache (max 4 hours). -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/ -- Sent via pgsql-www mailing list (pgsql-www@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-www