Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image height and width not working #419

Open
ramoshe opened this issue Apr 27, 2023 · 2 comments
Open

Image height and width not working #419

ramoshe opened this issue Apr 27, 2023 · 2 comments
Labels

Comments

@ramoshe
Copy link

ramoshe commented Apr 27, 2023

Describe the bug
Using the "data-width" and "data-height" properties for the slide does not seem to be working.

Are you able to reproduce the bug in the demo site
Yes

To Reproduce
Steps to reproduce the behavior:

  1. Add "data-width" and "data-height" properties to a gallery slide.

Expected behavior
Slides should be restricted to the width and height set (I tried 80%, 80vw/vh, pixels, ems)

Post the code you are using

	<a
		class="glightbox"
		href="https://res.cloudinary.com/theramoshe/f_auto/${image}.jpg"
		data-glightbox="title: ${title}; description: ${caption};"
		data-type="image"
		data-width="80%"
		data-height="80%"
	>
		<img
			class="gallery-image"
			src="https://res.cloudinary.com/theramoshe/f_auto/${image}"
			alt="${title}"
		/>
	</a>`;

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop:

  • OS: Mac OS
  • Browser: Chrome, Safari
  • Version: using CDN

Smartphone: N/A

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]
@zumbidoweb
Copy link

use viewport dimesions
data-width="80vw" data-height="80vh"

Copy link

stale bot commented Dec 15, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants