dnenb Posted April 5, 2014 Posted April 5, 2014 How do you limit the size of your players images? Quote
sniko Posted April 5, 2014 Posted April 5, 2014 (edited) With CSS. See Fiddle <div id="PlayerSignature"> <img src="http://www.takequickbreak.com/wp-content/uploads/2013/08/02-airborne-penguin-exits-water_1600.jpg" width="10000px" height="100000px" /> </div> [css] #PlayerSignature img { max-height: 250px; max-width: 250px; } [/css] max-height browser support max-width browser support Have fun. Edited April 5, 2014 by sniko Added browser support information. Quote
Samurai Legend Posted April 5, 2014 Posted April 5, 2014 If you have a bbcode engine. I believe you can code it in and make it have a limit of the size if it goes over the limit... If you mean the size of the picture. Send me your skype name. I will give you a code... Quote
sniko Posted April 5, 2014 Posted April 5, 2014 Works like I want it to - thanks sniko! You're welcome. Quote
Script47 Posted April 5, 2014 Posted April 5, 2014 With CSS. See Fiddle <div id="PlayerSignature"> <img src="http://www.takequickbreak.com/wp-content/uploads/2013/08/02-airborne-penguin-exits-water_1600.jpg" width="10000px" height="100000px" /> </div> [css] #PlayerSignature img { max-height: 250px; max-width: 250px; } [/css] max-height browser support max-width browser support Have fun. Penguins... Always the penguins! :D Quote
sniko Posted April 5, 2014 Posted April 5, 2014 Penguins... Always the penguins! :D :) Yep. They are awesome. Quote
Dave Posted April 7, 2014 Posted April 7, 2014 How do you limit the size of your players images? I'd also suggest limiting the size or you're going to make your site struggle to download all the assets. I'd run the image through the following function: http://uk1.php.net/getimagesize Here you could also check the width and height server side before even allowing the user to upload the image. Quote
dnenb Posted April 7, 2014 Author Posted April 7, 2014 I'd also suggest limiting the size or you're going to make your site struggle to download all the assets. I'd run the image through the following function: http://uk1.php.net/getimagesize Here you could also check the width and height server side before even allowing the user to upload the image. I'm just letting them use external images. Is there a way of checking the image size without downloading the image to my server? Quote
sniko Posted April 7, 2014 Posted April 7, 2014 I'm just letting them use external images. Is there a way of checking the image size without downloading the image to my server? I'm pretty sure getimagesize works remotely (IIRC). If not, download the file into a temporary file, and check there, then remove the temporary file after you're finished with it. Quote
KyleMassacre Posted June 26, 2014 Posted June 26, 2014 How much I can increase the size? I don't really think there is a limit to the size that you can do. But my question is why would you want to increase the size? The best thing is to use some sort of standard for your image because increasing it too much may distort the image and it will look like trash. Maybe have a look here and you can come up with a way to fit your needs: http://www.codediesel.com/php/fixing-aspect-ratio-of-images-in-php/ Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.