The form is not relevant. The picture can tailor-made styles without distortion of proportions, but with pruning, depending on how you make up. You can use PHP and associated libraries to cropnet as it should. front-end or back-end - not stage.
Miniatures, such as photographs, are often created on the server. And directly for display to another and at different resolutions everything was beautiful - the layout and possible JS.