datagrove / marketplace

2 stars 5 forks source link

To make the provider's account image fit #225

Closed RaqueAbarca closed 6 months ago

RaqueAbarca commented 7 months ago

Is your feature request related to a problem? Please describe: When trying to add the image for the provider's account, it either stretches or leaves empty spaces above and below.

Describe the solution you'd like: You can adjust the HTML or CSS so that the image fits without being modified to the designated space, for example:

 img-container {
  width: 100px; /* adjust the container size according to your needs */
  height: 100px;
  overflow: hidden; /* prevents the image from extending beyond the container */
}

.img-container img {
  width: 100%; /* ensures the image completely fills the container */
  height: 100%;
  object-fit: cover; /* adjusts the image, maintaining proportion and covering the container */
} 

In this example, object-fit: cover ensures that the image fits the container while maintaining its proportion and completely covering the designated space.

Additional context: image image

r-southworth commented 6 months ago

Appreciate the feedback but the proposed solution results in uncontrolled cropping of the images which is not any more desirable as a behavior. Other solutions may be considered in the future please feel free to submit additional ideas for resolution.