add minimun widths and paddings to preview images in case where the image is too small
start rewriting image preview code

I've been adding features very badly; rewrite the code so that functions can be
shared across different views (file and diff).

Currently it only rewrites preview on file view.
add missing indent_style to .editorconfig and fix code that has tabs and spaces
add comment to kick-off block and fix indentation
resolve merge conflict