Is there a way to upload images only from 100x100pixels?

bunny.invasion76

New Member
Messages
12
Reaction score
0
Points
0
Hi,
I've got a question: Is there a way to upload images only from 100x100pixels?
Not when you upload that it changes to 100x100 pixels, only that you can upload images from 100x100 pixels...

Greets,
 

vv.bbcc19

Community Advocate
Community Support
Messages
1,524
Reaction score
92
Points
48
Hi,
I've got a question: Is there a way to upload images only from 100x100pixels?
Not when you upload that it changes to 100x100 pixels, only that you can upload images from 100x100 pixels...

Greets,
Yes there is a round about way.
Windows + Search folder for image + based on size and copy paste them to a folder.
Then upload that folder using ftp.
Seems wierd.But this works for you.

Regards,
VVBB
 

lemon-tree

x10 Minion
Community Support
Messages
1,420
Reaction score
46
Points
48
@vv.bbcc19: I think he/she is referring to imposing that restriction on files uploaded through a PHP script and form, not files that they want to upload themselves.

@bunny.invasion76:
Code:
//Assuming you've checked the file is valid and there etc:
$filePath = $_FILES['namefromform']['tmp_name'];
$imageDimensions = getimagesize($filePath);
if($imageDimensions[0] === 100 && $imageDimensions[1] === 100){
//Dimensions are 100 x 100
}else{
//Dimensions are not 100 x 100
}
 

mandy0

New Member
Messages
32
Reaction score
0
Points
0
Another thing you can do.. let image be of any size create it's thumbnail of size 100*100 and upload it ;)
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
Note that if using PHP, you can only check the image size after the upload, which may work fine for your purposes. If you need to check before uploading, you'll need something special client side, such as a Flash uploader.
 
Last edited:
Top