wpsight / wpcasa

WPCasa WordPress Real Estate
https://wpcasa.com
GNU General Public License v2.0
42 stars 23 forks source link

Listing images in lisiting overview in WordPress are distorted #80

Open jensdraserschieb opened 6 years ago

jensdraserschieb commented 6 years ago

The listing images shown on larger screen sizes in the lisiting overview in WordPress are distorted, since height and width are both set to 100%. This could be solved by adding the following styles to wpsight-admin.css:

.column-listing_title .wpsight-listing-thumbnail img {
  object-fit: cover;
}
JoeHana commented 6 years ago

Thanks for the suggestion, but actually there is only a max-width and max-height set with each 100%, which should basically fit the image properly. The size used for those preview images is 150px in width and height while the parent div is limited to 75px. How large are your images?

We will for sure look into this issue and perhaps even apply the change, just want to know what exactly is wrong since it hasn't been reported before and since we're not able to reproduce this issue on our side. Thanks a lot

jensdraserschieb commented 6 years ago

Sure. The original image is 2000 px in width and 1500 px in height. It is correctly proportioned in the listings featured image (see attachment 1)

attachment_1-listing_featured_image.

However, in the listings overview, the image preview is distorted (see attachment 2, screenshot taken in Safari 11.1, same happens in Chrome 65).

attachment_2-no_object_fit_defined

Defining object-fit: cover; in addition to the max-height and max-width properties will solve the distortion (see attachment 3).

attachment_3-object_fit_cover