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

Config webpack with url-loader for image data url #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lingyun1010
Copy link
Collaborator

OT has switched to create-react-app which uses Webpack to encode small images as data URLs, and that breaks Switcher.js.

I installed url-loader and config webpack to load img as a data url.

@lingyun1010 lingyun1010 linked an issue Jan 12, 2023 that may be closed by this pull request
@lingyun1010 lingyun1010 self-assigned this Jan 17, 2023
Copy link
Member

@alfonsomunozpomer alfonsomunozpomer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this solve the original issue as described in https://www.pivotaltracker.com/story/show/179950544?

use: [{
loader: 'url-loader',
options: {
limit: 8000, // Convert images < 8kb to base64 strings
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this a good value?

@ke4 ke4 added the technical debt Technical debt label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical debt Technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Anatomogram’s switcher work with data URLs
3 participants