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

Add option to use scaled image and lightbox and full size for download #78

Open
arnowelzel opened this issue Apr 29, 2021 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@arnowelzel
Copy link
Owner

arnowelzel commented Apr 29, 2021

Also see https://wordpress.org/support/topic/option-to-load-custom-image-size-instead-of-full/ or https://wordpress.org/support/topic/download-image-in-full-size-not-scaled/

Some users might want to display a scaled image (e.g. "medium" or "large") in the lightbox and use the full size image only for downloads.

Caveats:

  • This also means the existing URLs in the image links need to be changed and there need to be additinal data attributes to indicate the "full" size URL for the download button
  • Image sizes in WordPress are only defined as absolute maximum values. The real image sizes generated for an indiviual image are not fixed. So one can not just simple replace the URL by adding "-WIDTHxHEIGHT" to it but instead all existing scaled versions have to be scanned in the upload folder and compared against the predefined sizes of the current theme.
@arnowelzel arnowelzel added the enhancement New feature or request label Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant