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

Allow for any number of output sizes #14

Open
GjjvdBurg opened this issue Jun 8, 2017 · 0 comments
Open

Allow for any number of output sizes #14

GjjvdBurg opened this issue Jun 8, 2017 · 0 comments

Comments

@GjjvdBurg
Copy link
Owner

Currently, HugoPhotoSwipe allows for three output sizes: large, small, and thumbnail. Additionally it supports the coverimage output using the cover output size. A feature idea I had was to generalize this to allow users to specify more different sizes. This would change the configuation from the current form (v0.0.15):

dim_max_cover: 600x600
dim_max_large: 1200
dim_max_small: 600
dim_max_thumb: 256x256
dirname_large: large
dirname_small: small
dirname_thumb: thumb

to something like this:

sizes:
  large:
    max_dim: '1600'
    use_smartcrop: false
  small:
    max_dim: '800'
    use_smartcrop: false
  thumb:
    max_dim: '256x256'
    use_smartcrop: true
  cover:
    max_dim: '600x600'
    use_smartcrop: true

In this setup, cover would have a special role, but for all the other sizes the name of the size will correspond to the old dirname_ setting, and there is the added option of using smartcrop for other sizes too. Additional sizes can be added by adding an item under the sizes setting. This could allow users to add other sizes for their specific website design, such as a super size for downloading a really large version of the image for instance. A side benefit for this setup is that it would simplify the code of HugoPhotoSwipe.

Is this a feature that you find interesting and useful? If so, leave a 👍 reaction to this issue

Ideas on how it could be implemented differently? Let me know below!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant