Code Monkey home page Code Monkey logo

avatars's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

avatars's Issues

Avatar generators flexibility

This is a feature request.

Have you consider making the avatars generators configurable?

I mean not only to depend on App::runningUnitTests():

public function create(): Avatar
    {
        return App::runningUnitTests()
            ? $this->laravolt()
            : $this->gravatar()
            ?? $this->laravolt();
    }

Some of us may have systems that are off the grid (no internet), and gravatar default generator returns:

 Illuminate\Http\Client\ConnectionException

  cURL error 28: Failed to connect to www.gravatar.com port 443: Timed out (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://www.gravatar.com/avatar/55a01a438d7dc704a59b95ecc39c9f0c?size=250&default=404

  at ..\vendor\laravel\framework\src\Illuminate\Http\Client\PendingRequest.php:665
    661▕                         $response->throw();
    662▕                     }
    663▕                 });
    664▕             } catch (ConnectException $e) {
  ➜ 665▕                 throw new ConnectionException($e->getMessage(), 0, $e);
    666▕             }
    667▕         }, $this->retryDelay ?? 100);
    668▕     }
    669▕

  1   ..\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:210
      GuzzleHttp\Exception\ConnectException::("cURL error 28: Failed to connect to www.gravatar.com port 443: Timed out (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://www.gravatar.com/avatar/55a01a438d7dc704a59b95ecc39c9f0c?size=250&default=404")

  2   ..\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:158
      GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle))

And this start even in the seeding (User creation).

As always, if you are ok with such change but have not time for it I can contribute. Just let me know if you would accept such flexibility.

Allow MIME type `image / jpeg`

This is a bug or feature request.

Prerequisites

  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you check the documentation?
  • Did you perform a cursory search?

Description

Do you think it is possible to add another type of image in the mime allowed
here?. To allow jpeg images.
When I try to load an image from the camera of the mobile it generates the exception of type of image not allowed image/jpeg.

Broken avatars on database restore (with laravolt/avatar) [minor]

This is a bug.

Prerequisites

  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you check the documentation?
  • Did you perform a cursory search?

Description

To setup the context, on our side we only use laravolt avatars, so no gravatars.
As I see, there is a slight different approach between laravolt avatars and gravatars. Avatars table contains a URL, which I believe is filled up when using gravatar, but not when using laravolt avatars. I also see that laravolt avatars are stored inside storage/app/avatars.

Steps to Reproduce

Import a different database.
Check users table. Avatars will look like:

image

Only newly created users will get a new correct avatar.

I've tried using enso:avatars:generate but this one does not work, and the reason is that this query:

User::doesntHave('avatar')->get()

does not return anything. That's because the database has all the relations set inside the avatars table:
image
therefore, the relations exists.

My thought are that the laravolt/avatars are not checked correctly. Although it may apply in gravatar's case too.

This is a minor issue since, on our side we can always use an alter enso:avatars:generate like :

User::get()->each->generateAvatar();

which will force avatars to be regenerated and created inside storage/app/avatars.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.