Article image resize - Forum | JoomShaper
Awaiting an answer SP Page Builder

Article image resize

Asked by Christos 5 years ago Last activity 5 years ago

Hi.
I am trying to make the article image using default layout to resize automaticaly and proportional to the original dimensions of the image. I tried many setting among them the following

.sppb-addon-articles.case-study-default-layout .sppb-addon-article .sppb-article-img-wrap {
width: 100% !important;
height:100% !important;
}

but it doesn't work. Could you help me?

6 replies

Rashida Rahman Staff

Hi there!

Would you please give me a screencast aboutthe issue and what you want?

And the link you have given is under construction.

Best Regards

Christos Asked this

Hi Rashida.
Please visit the homepage using
https://cibum.gr/index.php/
I would like to have images proportionaly resized based to the original dimensions of the image.
Now they use a fixed height.
If I have a video next to an image the video resizes propostionaly and the image has 304px height. So there is big a difference in the view of the articles. Now I had to change .embed-responsive to the following (I deleted the width:100%; and I added height:304px;
.embed-responsive {
position: relative;
display: block;
padding: 0;
overflow: hidden;
height: 304px;
}
Now it looks like this
http://optionco.eu/_files/screenshot_1.jpg

I changed the setting to its origin (your code and now it looks like this
http://optionco.eu/_files/screenshot_2.jpg
You could see it in
https://cibum.gr/index.php/

Thank you

Christos Asked this

Hi Rashida.
Will you please check my previous post?
Christos

Christos Asked this

I am sorry but you didn't answer my post since a week and I have to repost it.

Please visit the homepage using https://cibum.gr/index.php/
I would like to have images proportionaly resized based to the original dimensions of the image. Now they use a fixed height. If I have a video next to an image the video resizes propostionaly and the image has 304px height. So there is a big difference in the view of the articles.
To fix it I had to change .embed-responsive to the following (see screenshot_1.jpg)
I deleted the width:100%; and I added height:304px; .embed-responsive { position: relative; display: block; padding: 0; overflow: hidden; height: 304px; }
So it looked like this http://optionco.eu/_files/screenshot_1.jpg

But I would be better if the image resized proportionaly and not having a fixed height.
I changed my fix to its origin code and now it looks like this http://optionco.eu/_files/screenshot_2.jpg
You could see it in https://cibum.gr/index.php/

Could you propose any fix?
Thank you

Rashida Rahman Staff

Hi,

I'm really sorry for the unwanted delay!

Where did you put the code, please?
Would you please remove your own code from there, and let me have a clear understanding to what you want to achive actually with a screencast?

Apology again for the delay.

Best Regards

Christos Asked this
5 years ago · edited

Right now it works with your code.
Goto https://cibum.gr/index.php/
Then scroll down until you see
http://optionco.eu/_files/screenshot_2.jpg
As you could see Nick Cave Video is sorter than the green image.
That's why your code resizes proportionaly the video but uses a fixed height for the image.
I can fix this page using fixed height for the video too.
But I don't prefer that because it maybe be tricky using video next to image in other pages where I will have 3 or more articles in a row.
I would like to have images proportionaly resized based to the original dimensions of the image.
I don't know how else to describe it.
For some reason the following code doesn't work on image.

.sppb-addon-articles.case-study-default-layout .sppb-addon-article .sppb-article-img-wrap {
height: 100%;
width: 100%;
}

Log in to reply.