The Wayback Machine - https://web.archive.org/web/20211017221701/https://github.com/swagger-api/swagger-ui/issues/7494
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

Base64 packing the logo is unproductive and prohibitively complicated #7494

Open
acidtonic opened this issue Sep 10, 2021 · 1 comment · May be fixed by #7521
Open

Base64 packing the logo is unproductive and prohibitively complicated #7494

acidtonic opened this issue Sep 10, 2021 · 1 comment · May be fixed by #7521

Comments

@acidtonic
Copy link

@acidtonic acidtonic commented Sep 10, 2021

Base64 packing the logo is unproductive and prohibitively complicated.

Originally I just thought it was related to the method of delivery, minification,etc....

But then I discovered the "enterprise" copy you sell directly offers the "feature" of changing the logo, which then just packs up a new image.

Now I realize why changing the logo is difficult and you won't document how to do it in the free edition. Also explains why I see pages upon pages of questions asking how to change the logo online in forums only for you guys to change the filenames and method of packing the logo to make those instructions out of date.

Just going to directly and publicly point out that I don't like that and I think it's shady. Might as well bake in a checksum to go with your base64-packed SVG logo to complete the copy-protection.

Have a good day.

@ponelat
Copy link
Contributor

@ponelat ponelat commented Sep 13, 2021

One of the reasons Base64 encoding is great, is that there are less server dependencies required to host the image(s).

But aside from that, no-one is trying to make it difficult for users to modify swagger-ui. The hope is that it is as much your project, as it is mine. It's open source after all.

tl;dr quick fix

Here is the simplest solution I could find to replace the logo.
Add the following CSS (works on swagger-editor/swagger-ui).

.topbar-wrapper img {
    content: url(https://ponelat-images.s3.us-west-2.amazonaws.com/logo.svg);
}

Results
image

How to make it easier?

I do feel the frustration, and changing a logo should not be difficult for users. I took a look and found one open GitHub issue and several closed ones.

SwaggerUI comes with a powerful plugin system, that means the topbar itself can be replaced. But perhaps it's worth making a single plugin for just the logo. Or even a UI skinning documentation? I don't know yet.

This isn't a high priority for core contributors, but efforts to make this more accessible and easier are always welcomed!
Are you interested in helping, @acidtonic?

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

Successfully merging a pull request may close this issue.

2 participants