Gravatar implementation for Magento2
This extension implements Gravatar service in Magento 2! This module uses customer e-mail for generating Gravatar URL and it is complatible with Magento 2., (*1)
## Requirements Magento 2.0+, (*2)
## How to install, (*3)
Installation is pretty easy just use Composer for it and viola! If you can't install it via Composer just create Matej\Gravatar folders in app folder. Your folder structure should look like:, (*4)
app/code/ βββ Matej/ β β βββGravatar/ β β β βββ ... β β β βββ ...
## How to use There is optional Block code that you can use in templates:, (*5)
echo Matej\Gravatar\Helper\Data::getCustomerAvatarByMail($email); echo Matej\Gravatar\Helper\Data::getCustomerAvatarById($customer_id);
It automatically create block and put Gravatar URL (use those echo's for images src)!, (*6)
You can use custom PHP code for creating Gravatar URL based on custom params:, (*7)
$url = $this ->setGravatarSize(80) // Optional (default is 80) ->setGravatarSecured(false) // Optional (default is false) ->setGravatarDefaultImage('identico', false) // Optional (default is mm) ->setGravatarRating('g') // Optional (default is g) ->getGravatarURL('example@example.com'); echo $url; // Prints out: http://www.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0?s=60&r=g&d=mm
That's all!, (*8)