my $image = GD::Image->new('/path/to/local/file.jpg'); my $width = $image->width; my $height = $image->height;