Slider adjusting to image size

My goal is to have two images in a slider. Clicking on the arrow makes one image disappear and the other one appear and so on.
I can’t seem to create a slider that automatically adjusts its size to the images. When I drag an image in a box, it automatically adapts to the width of the window and thus, keeping its proportions, also adjusts its height.
How can I get a slider to do exactly that?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.