Image Thumbnail

jonimpson

New Member
I am getting a 504 Gateway Timeout when updating the image thumbnail for a site, is this on my side or is the a log file I can view to see what's causing it?

I resubmitted my API key just in case and did notice it was way longer than my original so was that changed?

**EDIT**
I've increased the timeout on my server which has fixed the 504 but all site images come up blank, and occasionally get a 524 timeout error now which is due to Cloudflare.
 
Last edited:

Mark

Administrator
Staff member
Can you provide a couple sample URLs? I can check the screenshot server log and see if they are generating
 

jonimpson

New Member
Can you provide a couple sample URLs? I can check the screenshot server log and see if they are generating
Is the only one I'm trying to generate atm, my site isn't super active maybe 1 registration a month haha, it will show that it generates but show up blank. If you like I can run some of the other sites I just didn't want to break their current images since those actually did generate last time I ran them.
 

jonimpson

New Member
Is there anyway to make this server side rather than having to go through the API that way we can adjust this manually ourselves in case something like this occurs..
 

Mark

Administrator
Staff member
Is there anyway to make this server side rather than having to go through the API that way we can adjust this manually ourselves in case something like this occurs..
Yes, if you have a dedicated server (root access required) and can install a headless browser. I would not be willing to support it, but would be willing to share the code so you could run it locally.
 

cajkan

Active Member
Yes, if you have a dedicated server (root access required) and can install a headless browser. I would not be willing to support it, but would be willing to share the code so you could run it locally.
I would also like if possible
 

Mark

Administrator
Staff member
This is the minimal configuration, but these are the steps to get it running. Since this is part of the service we provide, support for this is well outside the scope of a regular VisioList license. That said, enjoy! If you really need further help setting this up, feel free to send me a PM and I can provide a quote for your environemnt.

1) install wkhtmltoimage on your dedicated server
2) enable exec in your PHP configuration functions
3) create index.php file with the code I provided below (you will need to configure and secure it)
4) update screenshots.php with your IP address or domain name VisioList connects to your server instead of ours.

PHP:
$url = $_GET['url'];
$url2 = str_replace('/','-',$url);
$url2 = str_replace('?','-',$url2);
$url2 = str_replace('#','-',$url2);

e xec("/usr/local/bin/wkhtmltoimage --enable-javascript --javascript-delay 12000  --width 1024   --height 768 --encoding 'utf-8' $url /var/www/html/$url2.png");
 
Top