2

I am using this tool http://rvera.github.io/image-picker/ for selecting images in a Flask web-app. It works fine but I could find any way to set all images to a fixed size when displaying.

EDIT: The author suggests using Masonry as a tool for grid-alignment. It has parameters such as column-width. Can anyone please give an example of using Masonry with Image-picker ?

Lyman Zerga
  • 1,415
  • 3
  • 19
  • 40
  • You can the use [Flask-Resize](https://github.com/jmagnusson/Flask-Resize) extension and use it's jinja filter to resize images. – vivekagr Mar 12 '14 at 08:19
  • From what I understand from the 'Configuration' section there are sections called 'Where the resized images should be saved' and 'Create sub-directories' but I don't want to save it anywhere. I just want to display images from remote location (from S3 actually) – Lyman Zerga Mar 12 '14 at 18:34
  • If you don't want to resize on the server side then [use CSS to set a fixed size on the images](http://stackoverflow.com/questions/1733006/css-force-image-width-and-height-without-stretching) or use equal sized responsive grids (if using bootstrap or similar frameworks). – vivekagr Mar 12 '14 at 19:40

1 Answers1

5

I just did the following hack which works:

        <style type="text/css">
            .thumbnails li img{
                width: 300px;
            }
        </style>

Now I get images of uniform sizes.

Lyman Zerga
  • 1,415
  • 3
  • 19
  • 40
  • 3
    This is totally the right way to do it if you want images of the same size. Otherwise use mansonry. – RVera Apr 24 '14 at 05:15