question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use it without specifying picture size in pixels?

See original GitHub issue

I want to show only 1 image at the time. I want it to use all width of container, and automatically adjust height to respect image proportions. And i don’t want to specify width and height in pixels for each picture, as page has to be adaptive. I tryed this:

<Flicking :options="{panelsPerView: 1, adaptive: true}">
	<div v-for="i in 8" :key="i">
		<img :src="i + '.jpg'"/>
	</div>
</Flicking>

But its not working. It allways shows Images collapsed to size 0x0px unless i specify pxel size. Please help me!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
WoodNeckcommented, Mar 18, 2022

In that case, I think the CSS applied in the <div> element prevents height calculation of the img elements. Your div element probably always have height equal to 100% not regarding the actual contents height. Try adding height: fit-content, or set align-items: flex-start to flicking-camera element

Here’s some examples:

0reactions
WoodNeckcommented, Mar 21, 2022

I’ll close this issue to mark it as resolved, please reopen it if the issue still remains!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setting an image's size (in pixels) so that it won't have to be ...
In the screenshot below, what I would like to happen is for the image to fit the paper's width when I choose 'Original...
Read more >
How to Understand Pixels, Resolution, and Resize Your ...
In order to calculate this resolution you just use the same formula you would use for the area of any rectangle; multiply the...
Read more >
Photoshop image size and resolution
Learn how to work with image size and resolution in Photoshop. Learn about pixel dimensions and printed image resolution.
Read more >
What Resolution Should Your Images Be?
Use. Pixel Size. Resolution. Preferred. File Format. Approx. File. Size. Projected in class. About 1024 pixels wide for a horizontal image; or.
Read more >
how to specify image size in pixels - html
As not often is the case I use <img> elements. But, it is better practice to place the width and height in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found