gottfrois / link_thumbnailer

Ruby gem that fetches images and metadata from a given URL. Much like popular social website with link preview.
MIT License
511 stars 106 forks source link

Add favicon size option #134

Closed Warrior109 closed 5 years ago

Warrior109 commented 5 years ago

I think It will be cool if this gem will have the opportunity to set desired favicon size. For now with attribute favicon_size: we can choose which size will have priority. If this size doesn't exist - we return first founded favicon.

el = LinkThumbnailer.generate('https://www.cornmarket.ie/', attributes: [:favicon], favicon_size: '32x32')
el.favicon
>> "/images/favicon/favicon-32x32.png"
gottfrois commented 5 years ago

Hm interesting, sounds good, can you add some specs and update the config initializer with the new option explaining how it works? Like, setting nil will default for example.

Warrior109 commented 5 years ago

Ok. I will do it. Thanks.

Warrior109 commented 5 years ago

@gottfrois already updated

gottfrois commented 5 years ago

Can you please solve the conflict with you other PR?

Warrior109 commented 5 years ago

Already fix.