1.0.0

  • Update for Flarum v1
  • Discover bad error message regarding uploading big files (flarum/core2888)
  • Make modal not dismissible by default - clicking outside (or dragging while using cropper) will no longer close the modal
    • A button next to "Save Changes" will now close the modal
6 months later

This plugin was preventing users from uploading profile pictures to my site. I uninstalled it and it fixed the problem. If you get this error, try uninstalling and reinstalling.

    Fealist What error were you getting? There is an issue where the extension may increase the file size of the uploaded image, thus hitting upload limits on the server. Flarum v1.1.0 came with clearer error messages for these failures.

      datitisev The extension wasn't even saving the 8kb image. I spoke with the provider and there was no problem there either. I checked the permissions of the assest folder, there was no problem there. I tried uninstalling and reinstalling the plugin as a solution. You can view the link below by translating it into your language.

      https://flarumtr.com/d/2900

      18 days later

      I installed flarum in ubuntu 20 and php 8.
      I setup php.ini upload_max_size to 5mb but 600kb image upload failed with this error message "The attribute must not be greater than max kilobytes how to fix this problem.

      a month later

      I found a bug. When someone upload a bigger image than allowed, the error message is wrong.
      It says: "The :attribute must not be greater than :max kilobytes" with the :attribute and :max tags instead of the correct values.

        enricodx This is a core bug that has been fixed for the next Flarum release, I believe.

        I will say that sometimes the cropped image is larger in size than the original... I have a PR to fix this (resizes crop to 500x500 before uploading to server).

        2 months later

        Just updated my avatar at my forum and kept getting the max upload error. I reduced the size of the image and still got the error. Eventually, once I reduced it to 150kb, it uploaded. This was from my iPhone.

        If I deactivate this extension then I can upload large images for avatars again.

          010101 this extension doesn't compress images after resize, which means that small compressed images can actually become bigger through the resize process.

          This existing GitHub issue is probably about the same thing FriendsOfFlarum/profile-image-crop15

          Unfortunately there doesn't appear to be any easy solution without re-implementing how resizing works in the extension.

          7 months later

          1.1.0

          Updating
          composer require fof/profile-image-crop:"*"
          php flarum cache:clear
          3 months later

          Hello, I am getting the following error after the version update.

          Uncaught TypeError: Cannot read properties of undefined (reading '0')
          at ProfileImageCropModal.js:69:54

          this.cropper = new Cropper(evt.target || evt.path[0], {

            14 days later
            5 days later

            CQ_VOW35E4TK.png

            It seems that there will be a problem with uploading the avatar, uploading for a long time.

            And then this is shown in my F12 console.

            datitisev Hello, composer does not upgrade the extension to v1.1.1, I tried the following command:
            composer update fof/profile-image-crop,at most, it let me upgrade to v1.1.0...

            This is a funny phenomenon!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

            7 days later

            GitHenry The requirements of this extension have not changed, so I don't see why you cannot update to v1.1.1.

            It would help if you could post the entire output of the command, and perhaps also make sure your composer.json isn't locking the version to max v1.1.0.

            In addition, running composer why-not fof/profile-image-crop v1.1.1 might provide useful insights into why it's not being installed.

            5 months later