OpenBazaar-Client
OpenBazaar-Client copied to clipboard
Transparent GIF Images Get Black Background

We could have transparent backgrounds by switching from saving images as jpeg to saving as png. But there are some consequences:
- the files would be bigger
- they might look bad on some backgrounds
- currently, we handle images that 404 by having 2 background images, the second one is the default and is "under" the user's image. If the user's image has transparency, the default image shows through anywhere the top image is transparent.
#3 is the main one, we'd have to remove the default images, and if user images 404 then the image would just be blank instead of showing the default instead.
Maybe we should just prevent the user from uploading GIFs? I mean they're not animated anyways due to the base64 conversion so I don't see the value in allowing them to be uploaded in the first place.
GIFs that don't have transparent backgrounds would work fine. Though I don't think anyone uses GIFs anymore for anything but animation, so restricting them would be fine.
Why aren't we using png anyways? It would preserve transparency.
I think transparent images should be supported to make the software more professional. It is a lot of work for people with current websites to change all transparent images to have background colours in order to set them up in OB.
I would suggest maybe the possibility of changing the default 404 image to a white one in the store settings.
@jjeffryes Is this resolved?
I've updated the image code so that once Chromium supports exporting a webp image with alpha channels images with transparent backgrounds will work. Until then, we can't support them without switching to much larger pngs, which would make our bandwidth issues much worse.