vendrhub / vendr-checkout

A ready made checkout flow for Vendr, the eCommerce solution for Umbraco v8+
https://vendr.net/add-ons/vendr-checkout/
MIT License
14 stars 17 forks source link

Store logo - SVG #18

Closed JamieTownsend84 closed 2 years ago

JamieTownsend84 commented 3 years ago

As the store logo property is image only this does not allow for SVG, please can we remove the image only setting?

mattbrailsford commented 3 years ago

I think what we might need to do is maybe add an SVG specific image picker with fallback to the non-svg Version as that logo images is used on the site, but also in the email templates and SVG's aren't fully supported in email clients so we would potentially need both.

JamieTownsend84 commented 3 years ago

That would work for me

JasonElkin commented 3 years ago

Interesting. I'm using 1.2.0 with Umbraco 8.15.1 and I was able to pick an SVG - it rendered OK but wasn't the right size. I think it's just missing the necessary styles to constrain it (that would have been inferred from the image dimensions if it were a raster image).

If the image needs to be raster, which for the emails it certainly does, then I think there's a bug and something needs doing so we can't pick an SVG for that image.

Additional picker to supply an SVG seems like a great option.

JamieTownsend84 commented 2 years ago

It turns out you can select svg, but you cannot upload a new svg using that property. If you go to the media area and upload an svg and go back, you can select it. But as mentioned, the logo size isn't right though

mattbrailsford commented 2 years ago

I was looking today whether there was a way to easily convert an SVG to PNG such that if we detected an SVG, could you convert it to PNG in the email templates, but I'm just thinking this is too much of a rabbit hole.

Given the aim of Vendr Checkout is to be a simple drop in, I just think multiple fields for a logo are a bit confusing. With this in mind, I've switched the default picker type for the logo to the newer "Image Media Picker" such that only an image file can be picked so there is no confusion over the image types you can use.

If there is a specific reason for wanting an SVG such as poor image quality in certain situations, do let me know and we can look at other options such as using the <picture> tag to provide multiple image crops for better quality, but I think for the sake of simplicity a single image picker is going to be what we stick with for the time being at least.

JamieTownsend84 commented 2 years ago

Hi @mattbrailsford

Shame - the biggest issue for me was the size of the image over different view ports. I've had to manually update the files to render the file as I want. Which will be a pain to keep track of for updates.

I think a picture tag may be better, perhaps if I get time I'll try a PR

mattbrailsford commented 2 years ago

Thanks @JamieTownsend84

Yea, if you can provide details on those breakpoint quality issues, I think we can definitely address those issues with the picture tag and some alternative crops.