Warehouse: Display project logo images

Created on 20 Jul 2017  路  11Comments  路  Source: pypa/warehouse

Right now the project pages look pretty good, but are kind of same-y:

Theoretically these could be dressed up by ReST-savvy users. Realistically, I would love to see project images. I think this is especially important for the innumerable tile-based integrations out there, like this one on twitter:

That gray square seems so drab. (Even if we don't do project images, it'd be a quick fix to add the logo into the card.)

Maybe a URL in an argument to setup() (or in a toml file)? Maybe PyPI can help out with hosting? Maybe a data URL with mimetype? I think there are a lot of options, but having something graphical will really help PyPI keep visual pace in a media-rich world. :)

Low priority UUI feature request needs discussion

Most helpful comment

I don't have a problem with this, though it will likely need @nlhkabu to take a look at how to integrate it into the design sanely. I guess one question would be whether it should be a PyPI specific enhancement that is managed on PyPI, or whether it should be part of the packages themselves.

If the former then we need to add it to the (yet undone) project management pages it it likely makes the most sense to simply have it be a form that people can upload images for. If the latter then it'll need to go through disutitls-sig to figure out how to add it to the packaging metadata.

All 11 comments

I don't have a problem with this, though it will likely need @nlhkabu to take a look at how to integrate it into the design sanely. I guess one question would be whether it should be a PyPI specific enhancement that is managed on PyPI, or whether it should be part of the packages themselves.

If the former then we need to add it to the (yet undone) project management pages it it likely makes the most sense to simply have it be a form that people can upload images for. If the latter then it'll need to go through disutitls-sig to figure out how to add it to the packaging metadata.

Thanks for your suggestion, @mahmoud!

As I think you know, but for the benefit of other folks finding this thread: the folks working on Warehouse have gotten funding to concentrate on improving and deploying Warehouse, and have kicked off work towards our development roadmap -- the most urgent task is to improve Warehouse to the point where we can redirect pypi.python.org to pypi.org so the site is more sustainable and reliable. Since project-level images/avatars aren't something that the legacy site has, I've moved it to a future milestone.

But I agree that it would be great to give projects a way to display their logo/screenshot-type images someplace in the page and in, e.g., the Twitter card for the PyPI project URL.

Thanks for the idea, and sorry again for the wait.

Project logo images could show up on the project detail pages, and in search results and similar listings.

@dstufft any more thoughts on this?

I think we could make this a PyPI specific enhancement - that way we could set a minumum size, recommended dimensions, file format, etc.

In terms of displaying it on the page... I'm not sure. Some projects (e.g https://pypi.org/project/black/) display their logo in their project description, so, you'd end up with duplicate images.

One solution to this would be to add options to the image upload area. For example:

  • [ ] Use this image for social media links
  • [ ] Add this image to my project page

I'm checking to see if there's any existing conventions to use for this, but I'm not coming up with much.

CPAN, PHP PEAR, npm, ruby gems, rust crates.io: none of these have logos for packages.

GitLab projects can have a logo. Single file, raster format, square aspect ratio. It's used in a variety of contexts, some as small as 13px, up to Twitter cards ~which are often displayed at >聽400px.~ (maybe only "large image" cards are that, and the image on other summary cards is more reasonably thumbnail-sized?) https://gitlab.com/gitlab-org/gitlab/issues/17326

GitHub projects don't have a logo that displays on site, but you can add an image used specifically for "social media preview." The recommendation has a 2:1 aspect ratio, 1280脳640
https://help.github.com/en/github/administering-a-repository/customizing-your-repositorys-social-media-preview

Maven's Project Object Model used to have a project.logo field, in version 3 of the model. It doesn't in version 4. I've been unsuccessful in tracking down why.

So it seems like there's not an established convention in the world of software-development package-management. Looking beyond that, to what other application designers might have in their media assets for logos and icons, there is a dizzying array of many targets.

I'm afraid that doesn't narrow things down much!

My personal preference is that a icon field should be available in the package itself. For comparison, AppStream (https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html) has much the same data as distutils but includes icons because they have a lot of GUI tools that interact with package management.

My own use case is a gui package manager (Gtk) so anything would be better than nothing. Although having html social media only graphics would be a waste to a desktop app as we'd have to download a project's html page for every search result for example.

Couldn't this be solved by taking the avatar from github/ gitlab for the project? Or specifying an url?

Adding a project image in the packages would require a new version of the Metadata spec. It鈥檚 a high cost.

Image scraped from a project-URL (what you seem to suggest with the mention of github/gitlab) seems fragile: it鈥檚 implicit, could give unwanted result, and so would still require a page with options to control it.

The PyPI team seemed to prefer the other approach (see previous comments): specifying a picture URL for the project. That also seems simpler to me :slightly_smiling_face: A fallback to generic PyPI logo would round that out.

@merwok that seems like the better idea. Thank you for the explanation.

Looks nice! :+1:

Still got my fingers crossed for a customizable one someday :)

Was this page helpful?
0 / 5 - 0 ratings