Skip to content

How to make slide take original image size? #607

Closed Answered by davidjerleke
partridge1307 asked this question in Help
Discussion options

You must be logged in to vote

@partridge1307 either set image placeholders or if you are using the latest version you can follow this guide and do this:

.embla__slide {
  flex: 0 0 auto; /* Adapt slide size to its content */
  min-width: 0;
}

If you choose the latter, note this:

  • The carousel will automatically hard reset every time an image has finished loading because that will trigger a slide size change.
  • Also remember that the assumption here is that you have a correct setup as demonstrated here.

Best,
David

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@partridge1307
Comment options

Answer selected by partridge1307
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants