Jump to content

Recommended Posts

Hi @markus_blue_tomato

just wanted to let you know that I got rid of the errors ? I used 1600x900 for the blurhash which led to the errors on the one hand and also to a huge filesize on the other hand. Changing the blurhash size to 16x9 solved both issues.

I didn't want to use a small hash at first, because the images are part of a slider and the small hash messed up the design. I also didn't want to code things into css. I ended up setting the width of the hash as style attribute. Seems to work fine and got the document size from 1MB to 25kB ?  

Link to comment
Share on other sites

10 hours ago, bernhard said:

Hi @markus_blue_tomato

just wanted to let you know that I got rid of the errors ? I used 1600x900 for the blurhash which led to the errors on the one hand and also to a huge filesize on the other hand. Changing the blurhash size to 16x9 solved both issues.

I didn't want to use a small hash at first, because the images are part of a slider and the small hash messed up the design. I also didn't want to code things into css. I ended up setting the width of the hash as style attribute. Seems to work fine and got the document size from 1MB to 25kB ?  

Haha great, and sorry - I completely forgot the issue due some spontaneous new ProcessWire side project for the guest registration in Vienna/Lower Austria:
https://www.heute.at/s/cowirtat-hilft-bei-der-registrierung-im-gasthaus-100106087

 

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

Hi,

I'm getting an error when trying to use this module:

Erreur fatale: Uncaught Error: Class 'kornrunner\Blurhash\Blurhash' not found in site/modules/ImageBlurhash/ImageBlurhash.module.php:245

#0 site/modules/ImageBlurhash/ImageBlurhash.module.php(71): ImageBlurhash->createBlurhash('/customers/a/6/...')
#1 wire/core/Wire.php (397): ImageBlurhash->hookSavePageField(Object(HookEvent))
#2 wire/core/WireHooks.php (927): Wire->_callMethod('hookSavePageFie...', Array)
#3 wire/core/Wire.php (465): WireHooks->runHooks(Object(FieldtypeImage), 'savePageField', Array)
#4 wire/core/PagesEditor.php (849): Wire->__call('savePageField', Array)
#5 wire/core/Pages.php (ligne 245 de site/modules/ImageBlurhash/ImageBlurhash.module.php)

Any ideas what's causing it?

Link to comment
Share on other sites

On 10/21/2020 at 1:01 PM, Beetrootman said:

Hi,

I'm getting an error when trying to use this module:


Erreur fatale: Uncaught Error: Class 'kornrunner\Blurhash\Blurhash' not found in site/modules/ImageBlurhash/ImageBlurhash.module.php:245

#0 site/modules/ImageBlurhash/ImageBlurhash.module.php(71): ImageBlurhash->createBlurhash('/customers/a/6/...')
#1 wire/core/Wire.php (397): ImageBlurhash->hookSavePageField(Object(HookEvent))
#2 wire/core/WireHooks.php (927): Wire->_callMethod('hookSavePageFie...', Array)
#3 wire/core/Wire.php (465): WireHooks->runHooks(Object(FieldtypeImage), 'savePageField', Array)
#4 wire/core/PagesEditor.php (849): Wire->__call('savePageField', Array)
#5 wire/core/Pages.php (ligne 245 de site/modules/ImageBlurhash/ImageBlurhash.module.php)

Any ideas what's causing it?

This module requires https://github.com/kornrunner/php-blurhash.

The best way to install ImageBlurhash is to install it via composer: 

composer require blue-tomato/image-blurhash

This install also all dependencies

Link to comment
Share on other sites

  • 4 weeks later...

Hey I've made a pull request for ratio issues. ?

For composer I've seen your post regarding this, personally I'm not a big fan of the solution. Having this 2 separated ways to install a module makes it so that if you require dependencies, an installation from modules.processwire.com would fail, a zipped upload would fail, and an exported site profile with this module would also fail (And it's a no-brainer to include this module for a basic install).

Personally, I would include the dependency directly (even Ryan does this), at least until there's a better solution for this problem.

Link to comment
Share on other sites

Quote

Personally, I would include the dependency directly (even Ryan does this), at least until there's a better solution for this problem.

Here I was referring here to the Stripe package for Form Builder, but I searched a bit more and he also made another solution with the GoogleClientAPI: https://github.com/ryancramerdesign/GoogleClientAPI/blob/master/GoogleClientConfig.php

@markus_blue_tomato if there was a way like this to install the dependency from the module's config screen, would you accept a pull request for this?

Link to comment
Share on other sites

On 11/18/2020 at 5:38 PM, Martin1 said:

Here I was referring here to the Stripe package for Form Builder, but I searched a bit more and he also made another solution with the GoogleClientAPI: https://github.com/ryancramerdesign/GoogleClientAPI/blob/master/GoogleClientConfig.php

@markus_blue_tomato if there was a way like this to install the dependency from the module's config screen, would you accept a pull request for this?

Sure you can :-)

Link to comment
Share on other sites

  • 9 months later...

@markus_blue_tomato I've noticed that blurhashes aren't regenerated when images are replaced via drag-and-drop in the admin. Have you run into this or is this a known limitation of the module? Best way to reproduce is: clone a page with a populated single-image field, drag a new image into the image field of the cloned page and save. The blurhash still looks like the old image from the page it was cloned from.

Link to comment
Share on other sites

3 hours ago, d'Hinnisdaël said:

@markus_blue_tomato I've noticed that blurhashes aren't regenerated when images are replaced via drag-and-drop in the admin. Have you run into this or is this a known limitation of the module? Best way to reproduce is: clone a page with a populated single-image field, drag a new image into the image field of the cloned page and save. The blurhash still looks like the old image from the page it was cloned from.

@markus_blue_tomato One solution could be to store an extra key containing the last modified timestamp from the image together with the blurhash string, and then every time before output, compare the (current) images last modified timestamp with the stored one. If the stored one is older, regenerate the blurhash string.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

On 9/7/2021 at 5:05 PM, d'Hinnisdaël said:

@markus_blue_tomato I've noticed that blurhashes aren't regenerated when images are replaced via drag-and-drop in the admin. Have you run into this or is this a known limitation of the module? Best way to reproduce is: clone a page with a populated single-image field, drag a new image into the image field of the cloned page and save. The blurhash still looks like the old image from the page it was cloned from.

Hm, that sounds like a bug. I would appreciate an PR or Issue Report in Github since I'm very busy the next weeks.

  • Like 1
Link to comment
Share on other sites

  • 2 years later...

Hi @markus_blue_tomato I've finally come around to investigating the issue where newly uploaded images would keep the old blurhash. I have a working backward-compatible fix ready in a fork, but I see that the module itself has been marked as readonly for a while and I can't create any PRs against it. Would you accept this fix via some other means?

  • Like 2
Link to comment
Share on other sites

@markus_blue_tomato I'm also thinking of adding support for alternative hashing methods, specifically ThumbHash. The colors with ThumbHash seem to be a bit closer to the original and it also supports alpha channels. Would you be willing to accept a PR for that? I'd love to avoid creating a separate module, as the core logic would just be duplicated. Adding a new setting is much more elegant and allows experimenting with both hashing methods more easily. If it helps and it's possible, I'd be willing to take over maintenance of the module and take it from there.

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...