add logo / photo support

need to be tested, since i have no much time now.. ;)
Please change to 
```php
if ($encode) {
```
as that is PSR-2-code-styled