Re: Restricting image height and width in a message

From: Date: Fri, 17 May 2002 15:14:43 +0000
Subject: Re: Restricting image height and width in a message
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-98104@lists.php.net to get a copy of this message
"Jeff Lewis" <jeff@hyrum.net> wrote in message news:004e01c1fda3$78a91cd0$76a1a8c0@LEWISJCIT... > Currently, people can post links to images in an application I am using but > they can post something outrageous like 1000X800 pixels and it messes thing > up on the format. I was sent this as a solution but it really bogs down > especially on images from certain servers. Is there a better way to do > this? ... you are asking your server to load each external image to find its size every time the page is called. This is (ahem) somewhat inefficient. I would look at your link-adding page: 1. ask users not to link to super-huge images OR ask for a thumbnail link as well as the full-size; 2. when links are submitted, get the image size and store it in a local database; then get the image size (and thumbnail-image-size) at the same time you retrieve the link (and thumbnail-link)... set the preview image to the thumbnail, and the anchor to the full-size image.

« previous php.general (#98104) next »