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

faker.image.dataUri() always returns svg-base64 #3346

Closed
matthewmayer opened this issue Dec 28, 2024 · 0 comments · Fixed by #3347
Closed

faker.image.dataUri() always returns svg-base64 #3346

matthewmayer opened this issue Dec 28, 2024 · 0 comments · Fixed by #3347
Assignees
Labels
c: bug Something isn't working m: image Something is referring to the image module p: 1-normal Nothing urgent
Milestone

Comments

@matthewmayer
Copy link
Contributor

faker.image.dataUri() should return either of the 'svg-uri', 'svg-base64' types if no type if provided, but actually always returns 'svg-base64'

> faker.image.dataUri()
'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9ImZ1bGwiIHdpZHRoPSIzNjI2IiBoZWlnaHQ9IjM3NDUiPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9IiM4ZTk3ZTgiLz48dGV4dCB4PSIxODEzIiB5PSIxODcyLjUiIGZvbnQtc2l6ZT0iMjAiIGFsaWdubWVudC1iYXNlbGluZT0ibWlkZGxlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSJ3aGl0ZSI+MzYyNngzNzQ1PC90ZXh0Pjwvc3ZnPg=='
> faker.image.dataUri()
'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9ImZ1bGwiIHdpZHRoPSIxOTI2IiBoZWlnaHQ9IjI2MjgiPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9IiNhNTc3ZDMiLz48dGV4dCB4PSI5NjMiIHk9IjEzMTQiIGZvbnQtc2l6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SIxMjMyIiBoZWlnaHQ9IjEzNDAiPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9IiMzNmE2OGMiLz48dGV4dCB4PSI2MTYiIHk9IjY3MCIgZm9udC1zaXplPSIyMCIgYWxpZ25tZW50LWJhc2VsaW5lPSJtaWRkbGUiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IndoaXRlIj4xMjMyeDEzNDA8L3RleHQ+PC9zdmc+'
@matthewmayer matthewmayer self-assigned this Dec 28, 2024
@matthewmayer matthewmayer added c: bug Something isn't working p: 1-normal Nothing urgent m: image Something is referring to the image module labels Dec 28, 2024
@ST-DDT ST-DDT added this to the vAnytime milestone Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: bug Something isn't working m: image Something is referring to the image module p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants