Fixed bug when image was incorrectly positioned because of scroll.
Fixed bug when it crashed when the render_gallery_for method's first argument was association.
Fix of the way of the image path evaluation.