I am working on a project where system ask for companies to upload their logo, once they upload their logo that logo displays in the top left corner of header.
Now different companies have different logo sizes, some companies represent their logo in horizontal way some in vertical , square , circular etc etc.
In my website the logo space is in rectangular form, as it is showing in image below for phpMyAdmin logo, i wanted to manage the logo uploaded by companies from their account in the same way, whether their logo are in rectangular form or in square or circular.
It it can be achieved by html, css then it would be great, otherwise if i have to resize the logo image while uploading using php then how should i resize image in php.
If you want to resize image using php.You need to use either PHP's ImageMagick or GD functions to work with images.
But in this case you don't need these functions because you can accomplish this by using css.
<img src="path to logo" class="img-responsive">
.img-responsive {
display: block;
height: auto;
max-width: 100%;
}
Simply set a dimension limit for images to be uploaded in you code.. so companies will not be able to upload images with largest dimensions.So that you don't have to resize those images..