appernetic / hugo-nederburg-theme

Nederburg is a fast and secure hugo theme and is a port of the Tracks WP theme
Other
107 stars 89 forks source link

images are cropped #55

Closed rdiaz02 closed 5 years ago

rdiaz02 commented 5 years ago

Images in the posts seem to be cropped, and I cannot figure how to prevent it; they are also slightly, though not as much, cropped in the listing of posts. Is there a way to force images not to be cropped at all? I've tried playing around with custom.css to no avail. (The cropping seems independent of the size of the image ---I see the same results with images resized to very different sizes).

rdiaz02 commented 5 years ago

OK, I figured it out (yes, it was kinda obvious :-) ). For images not to be cropped their ratio has to be approximately 2/1 (horizontal/vertical). Thus, square images, for example, will have top and bottom cropped (as their horizontal dimension fills up the space). The solution I came up with was to open the figure in Gimp, and copy it into an empty, white canvas of the the right (2/1) proportions (my problem images were square, so I set width = 2 * height in the empty canvas).

I am closing this issue. However, may I suggest that this could be documented somewhere?