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

Gitbook 'fancybox' plugin makes it impossible to use 2x (Retina-friendly) images #178

Open
2 tasks done
peterflynn opened this issue Feb 20, 2019 · 1 comment
Open
2 tasks done

Comments

@peterflynn
Copy link
Contributor

Topic

This is an issue regarding:

  • The tutorials contained within this repo.
  • The samples contained within this repo.

Description of the issue

We use the 'fancybox' plugin for Gitbook to enable clicking an image in the docs to see a larger version. However, this plugin doesn't appear to understand 2x image assets, so it renders all such images at double the correct size.

Once we find a better solution, we should scrub through all our diagrams and other assets and update them to nicer, crisp Retina images.

Proposed solution or attempted solutions that failed

We can't work around this via the usual Markdown escape hatch of raw HTML, since the fancybox plugin processes raw <img>tags too and it throws away any attributes you put on the tag.

Looking at the fancybox plugin's source code, the template they use has no accomodation for size, style, or other attributes (https://github.com/ly-tools/gitbook-plugin-fancybox/blob/master/index.js#L8-L10) and there is no way to have it ignore some images (which wouldn't be ideal anyway).

@peterflynn
Copy link
Contributor Author

Filed ly-tools/gitbook-plugin-fancybox#4 on this issue in case the Fancybox plugin is willing to fix this on their end. It hasn't been updated in years though, and a bug filed in May 2016 never got any response...

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

No branches or pull requests

1 participant