Keeping The Original Proportions Of An Image - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Keeping The Original Proportions Of An Image

Alex Walker

Alex Walker

SP Page Builder 2 years ago

I have added images using the Image Content addon such as here: https://jamesmackie.art/marbles All the images are the same size an proprtion (boxed) and I want them to retain their original size and dimension in the thumbnail. How can I do that please?

0
11 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #117106

Oh, I think I know.... it's problem for Devices with screen between 576 - 767px, here is a solution:

@media screen and (min-width: 576px) and (max-width: 767.98px) {
.sppb-addon-image-content .sppb-image-holder {
  position: inherit; width: 100% !important; height: 300px;}
}
0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 2 years ago #116645

Hi there!

Thanks for contcting us.

This addon has the image as background image, so it does cover the whole space of the container/holder. So, it's probably not possible to get the original proportion of the image in the image content addon.

Here is a sample screenshot: https://prnt.sc/lO3CvJbViHLm

Best Regards

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #116670

Hi Alex,

it's better to use Image Layout addon where image is < img > not a background-image CSS.

OR

keep addon that you have already but use below custom CSS

.sppb-addon-image-content .sppb-image-holder {
  background-size: contain;}
becuase by default it's background-size: cover (!)
0
Alex Walker
Alex Walker
Accepted Answer
2 years ago #116754

Paul see jamesmackie.art/marbleemarblesmarbles marbles suspension 2. - how can i have only one image displaying?

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #116770

Are you sure that URL is correct, I see Error 500 there.


Here is small update of my Custom CSS, should be:

.sppb-addon-image-content .sppb-image-holder {
  background-size: contain;
  background-repeat: no-repeat;}

then only 1 image will be displayed. Add it inside Template Options > Custom Code > Custom CSS and then will be used everywhere.

0
Alex Walker
Alex Walker
Accepted Answer
2 years ago #116794

Paul, that worked perfectly! Thank you!!!

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #116795

I am glad that I could help. Please mark topic as solved.

0
Alex Walker
Alex Walker
Accepted Answer
2 years ago #116912

Paul, just one more thing. when viewing the image in Landscape on a mobile the text covers the image. Can the text go beneath or alongside the image?

0
Alex Walker
Alex Walker
Accepted Answer
2 years ago #116930

Paul, can you let me know if you have seen this post? i still have one more related question. thank you. Alex

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #117102

when viewing the image in Landscape on a mobile the text covers the image

Can you show me screenshot link, on Mobile view (browser elmulator) looks OK

0
Alex Walker
Alex Walker
Accepted Answer
2 years ago #117173

P E R F E C T Paul. Thank you. Alex

0