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 😄  

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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?

Share this post


Link to post
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 :-)

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By picarica
      so this is really weird issue i am so confused about this, so i have setup 'images' field where i put images and the include them in CKeditor, should work right? well it works on some sites, i use it nearly in every page but at one page, the images included in that CKeditor only show up, when i am logged into processwire, when i turn on incognito mode the images dissapear, but only on this specific page, everywhere else it works perfectly, has anyone came across this issue? i have nowhere in the site login checker, i have no idea what is going on
    • By picarica
      so i am trying to fetch dimensions of image using getimagesize() but it returns nothing, at least i think so, i want to feed it to data attribute, bit its emtpy, i tried feeding it the image directly or just image->url
      here is my source code

       
      foreach($page->repeat_body as $r_body) { /* other code here*/ if ($r_body->gallery_check == 1) { echo "<div class='my-gallery' id='grid-gallery' itemscope itemtype='http://schema.org/ImageGallery'>"; foreach($r_body->image as $image) { $options = array('quality' => 80, 'upscaling' => true, 'cropping' => 'north', 'sharpening'=>'medium'); $thumb = $image->size(400, 400, $options); $large = $image->size(1280, 0, $options); list($width, $height) = getimagesize($image->url); echo " <figure itemprop='associatedMedia' itemscope itemtype='http://schema.org/ImageObject'> <a href='$large->url' itemprop='contentUrl' data-size='$widthx$height' data-index='0'> <img src='$thumb->url' height='$height' width='$width' itemprop='thumbnail' alt='Beach'> </a> </figure>"; } echo "</div>"; } /* other code here*/ } now, the images are outputted correctly, i can open then and browse them
    • By olafgleba
      Hi,
      maybe kind of related to https://processwire.com/talk/topic/13286-image-description-not-saving/ but with other environment bits.
      While adding a new page/edit a existing page containing a image field, the image itself gets stored into the database but strangely the entered description does not. More strangely this only happens on my staging server. Within my local dev environment all is fine. And beside of this particular problem, all parts of the PW instance works fine. On both environments (s. below).
      First suspicion was the varying PHP/mysl versions of the local <-> staging environment. But, there are many working projects with the identical setting (s. below).  And i never encounter this problem so far.
      No error/log/console output. It just fails to get stored.
      Local Environment: PHP  7.4.6, mysql 5.7.29, PW 3.0.148
      Staging Environment*: PHP 7.0.33, maria DB 10.1.46, PW 3.0.148
      Maybe someone has a hint what to try?  Thanks in advance.
      *) I cannot change the staging server php/mysql settings because its part of a shared hosting account.
    • By arnd
      Hi,
      I have a repeater with some images in it.
      As Superuser I can work with the Actions (rotate...). But my Users with lower Rights can't use this Actions.
      The same User can use the Actions on images outsite a Repeter-Field. So I think it's not a Problem of Rights-Management but from Images in Repeater Fields.
      ProcessWire 3.0.164.  Bug? Or can I manage this in the settings?
      Thanks in advance
    • By Mats
      BETA: SplashAndGrab
      https://github.com/madebymats/InputfieldSplashAndGrab
      This module attaches a search input to selected image fields that lets you search and download images from Unsplash.
      (Unsplash is a stock photo service where you can download images for free and use as you wish. No strings attached.)   
      You can search by string, colors, orientation/crop and order by relevance or time published
      I find Unsplash useful both for placeholder images when building sites but also as a time saver for editors if they don’t have any images at hand, just search, download and publish.

      Thanks to @apeisa for building the  FlickrInputField Module and @Robin S for AddImageUrls,  took a lot ideas and code from those modules.
×
×
  • Create New...