Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Image Aspect ratios

Hi

When you set a width of 100px and height auto aspect ratio is preserved but if you set height of 100px and width auto the aspect ratio is not preserved. the image gets stretched.

How can a retain aspect ratio of images based on a fixed height.
You used to have a tick box that allowed you to maintain aspect ratio. How do we achieve this now?

Thanks

Galyna Abramovych
Site Admin
Posts: 84
Joined: Tue Mar 22, 2016 6:03 pm

Image Aspect ratios

Hello Deon,

You must have been mistaken:
We still have this option for JQM projects enabled and it works as expected: https://docs.appery.io/v2.2.0/docs/ap...
You might have meant defining the Image component in Ionic or Bootstrap. If so, please give more details on what exactly you have tried as I couldn't reproduce the issue in an Ionic app.

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Image Aspect ratios

My apologies, you are correct. I am blind!!!!

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Image Aspect ratios

Hi

I have selected aspect ratio but now cant set the dimensions?

How do I set the vertical dimension to 100px and width auto?

I need to have an image 100px high and width must scale automatically in order to maintain the aspect ratio.

This only seems to work when width is set and height is auto with aspect ration unchecked.
I need all my images the same height but whatever width but maintaining aspect ratio

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Image Aspect ratios

This is not working for me.

I have a grid with two columns.

I want a pic in the left column with a fixed height and auto width. In the right hand column I have text.

If I set the left and right hand column width to auto, the grid is split 50/50 and the text is either to far from the image or imposes on the image.

I need the text to be right next to the image regardless of how wide the image is. In other words the the right had column needs to expand and contract according to the width of the image in the left hand column.

How do I achieve this please. I have done all sorts but nothing seems to help.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Image Aspect ratios

Hello Deon,

It seems don't fit to the grid. Please add these components (label, image) to the HTML component with a type = "div" and set any width/position to them with a custom CSS

Return to “Issues”