Search…

X3 Photo Gallery Support Forums

Search…
 
DigitalVulcan
Topic Author
Posts: 3
Joined: 10 Apr 2021, 09:03

Images not caching? please help

10 Apr 2021, 20:53

Hello,

I purchased a license yesterday as what you have made here is exactly what i am after, however i am having issues with the image caching.
My images are between 8MB to 20MB and every time I load the site, it wants to download the whole image, not a resized one, i think i have
adjusted the settings correctly to resize images that large in size but it just doesn't seem to be working, the cache folder only generates files in the 
folders and menu files, but not images...

I believe i have all my permissions right as it is able to create some files in cache/folders and cache/menu folders
i have also tried changing the cache key to re-generate the cache but still nothing in the cache/images folder.

    // images
    'load_images' => true,
    'load_files_proxy_php' => false,
    'load_images_max_filesize' => 1000000, // maximum file size (bytes) for un-resized images loaded into list
    'load_svg_max_filesize' => 100000, // 100k
    'image_resize_enabled' => true,
    'image_resize_cache' => true, // todo: remove this option and just use 'cache?
    'image_resize_dimensions' => 320,
    'image_resize_dimensions_retina' => 480,
    'image_resize_quality' => 85,
    'image_resize_function' => 'imagecopyresized', // imagecopyresampled / imagecopyresized
    'image_resize_sharpen' => true,
    'image_resize_memory_limit' => 1024, // 128 MB is suffient to resize images around 6000 px / 0 = ignore memory
    'image_resize_max_pixels' => 0, // 30 MP equivalent to an image 6000 x 5000 / 0 = no limit
    'image_resize_min_ratio' => 1.5, // min size diff original vs resize. Only resizes if ratio > min ratio
    'image_resize_cache_direct' => true, // if enabled and delete cache, must increase cache_key

    // menu
    'menu_enabled' => true,
    'menu_show' => true,
    'menu_max_depth' => 5,
    'menu_sort' => 'name_asc', // name_asc, name_desc, date_asc, date_desc
    'menu_cache_validate' => true,
    'menu_load_all' => false,
    'menu_recursive_symlinks' => true, // List sub-directories of symlinks in the main menu. May cause menu loops and/or duplicate menu items

    // files layout
    'layout' => 'rows', // list, blocks, grid, rows, columns
    'image_cover' => false, // scales image inside container for list, block, grid and rows layouts.
    'sort' => 'name_asc', // name, date, filesize, kind
    'sort_dirs_first' => true,

    // cache
    'cache' => true,
    'cache_key' => 4,
    'storage_path' => '_files',

    // exclude files directories regex
    'files_exclude' => '', // '/\.(pdf|jpe?g)$/i'
    'dirs_exclude' => '', //'/\/Convert|\/football|\/node_modules(\/|$)/i',
    'allow_symlinks' => true, // allow symlinks

    // various
    'history' => true,
    'breadcrumbs' => true,
    'transitions' => true,
    'click' => 'popup', // popup, modal, download, window, menu
    'code_max_load' => 100000,
    'code_allow_edit' => false,
    'popup_interval' => 5000,
    'topbar_sticky' => 'scroll', // true, false, 'scroll'
    'check_updates' => false,
    'allow_tasks' => true,
    'get_mime_type' => false, // get file mime type from server (slow) instead of from extension (fast)
    'context_menu' => true, // disable context-menu button and right-click menu
    'prevent_right_click' => false, // blocks browser right-click menu on sensitive items (images, list items, menu)
    'license_key' => ''

Below is a screenshot of what it looks like on the website.
I am still able to click on them and view the full picture, just cant see the preview.
Image
any help would be greatly appreciated.
Last edited by DigitalVulcan on 10 Apr 2021, 20:57, edited 2 times in total.
 
DigitalVulcan
Topic Author
Posts: 3
Joined: 10 Apr 2021, 09:03

Re: Images not caching? please help

10 Apr 2021, 21:16

Here is a few lines from one of the cached files in "cache/folders"

{"basename":"Todd","fileperms":"0775","filetype":"dir","is_writeable":true,"is_readable":true,"is_link":false,"mime":"directory","mtime":1618044450,"path":"","url_path":"images/users/Todd","dirsize":348717056,"files_count":41,"images_count":41,"files":{"test":{"basename":"test","fileperms":"0775","filetype":"dir","filesize":false,"is_readable":true,"is_writeable":true,"is_link":false,"mtime":1618044450,"path":"test","mime":"directory","url_path":"images/users/Todd/test"},"_DSC0433.JPG":
 
DigitalVulcan
Topic Author
Posts: 3
Joined: 10 Apr 2021, 09:03

Re: Images not caching? please help  Topic is solved

10 Apr 2021, 21:24

aah, PHP-GD wasn't installed correctly...
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12765
Joined: 30 Sep 2006, 03:37

Re: Images not caching? please help

11 Apr 2021, 01:08

DigitalVulcan wrote:aah, PHP-GD wasn't installed correctly...
Ok! Yes, I could see in the screenshot that there were actual errors with the resized images. Maybe there should be improved diagnostics to encounter this ...
 
traxnamibia
Posts: 2
Joined: Today, 08:16

Re: Images not caching? please help

Today, 09:57

Hi there,

I am extremely interested in using embed.photo.gallery and therefore files.photo.gallery as well, but would be grateful if you could answer the following questions and help me fix an issue I am having on my cPanel server. I have checked that mbstring and GD library are installed, but maybe there is an issue with the installation that I can't see? 

1. In files.photo.gallery I have an issue where the thumbnails are not rendering even though I have set the following in config.php:
'get_mime_type' => true,
'get_mime_type' => false,
'get_mime_type' => ‘disabled’,

Image

I am not 100% sure that the app is reading the config file because I have also tried changing other settings but with no effect.  Please let me know if you need access to my server.

2. I see that the license fee for files.photo.gallery is USD39. I also see mention of USD39 in the embed.photo.gallery website. I assume there is only one payment for using embed.app as part of files.app?

3. Can you also clarify the license fee for ALL your products (embed, files and photo :
Is the fee per server?
Is the fee per domain? 
Is the fee per subdomain?

4. Lastly, do you have a timeline when you will provide the ability to “Upload, move, copy and delete files” ( *coming soon! )

Many thanks,

Bruce.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12765
Joined: 30 Sep 2006, 03:37

Re: Images not caching? please help

Today, 10:20

Hi. Looking from the screenshot, there is an error, and my guess would be: Either GD is not installed/working properly, or there is a memory_limit issue. What's your memory limit? Basically you need to diagnose this by loading an image in browser and reading the error message. Optionally, you can check your server PHP error log.

If you have a link for me, I can easily diagnose the issue. If not, then you would have to diagnose it yourself: 1. Open Chrome > View > Developer > Developer Tools, click "Network" tab, click "Img" sub-tab, then reload the page. The images will come up there, in red color (error), and then you click one "open in new tab" and see the error message.

PS! At the time of writing, I tried to load your Files app in browser (taken from the link of the attached image), and resized images seem to be working fine there.
traxnamibia wrote: 'get_mime_type' => true,
'get_mime_type' => false,
'get_mime_type' => ‘disabled’
This is unrelated to the image error. The above should remain on default "false" unless you have specific reasons to attempt to read mime types (for the frontend) directly from PHP.
traxnamibia wrote:I am not 100% sure that the app is reading the config file because I have also tried changing other settings but with no effect.  Please let me know if you need access to my server.
As mentioned, you wouldn't normally see any difference from changing the "get_mime_type" setting. If you have problems with config not applying, then I would need to see and understand the problem.
traxnamibia wrote:2. I see that the license fee for files.photo.gallery is USD39. I also see mention of USD39 in the embed.photo.gallery website. I assume there is only one payment for using embed.app as part of files.app?
You don't need to purchase files app to use embed app, because files is just the "engine" for embed. However, if you will actively be using both applications and want to remove the "nag" in Files app, then you would need to purchase a license for Files app also. You don't need a Files app license to use Embed app licensed.
traxnamibia wrote:3. Can you also clarify the license fee for ALL your products (embed, files and photo :
Is the fee per server?
Is the fee per domain? 
Is the fee per subdomain?
Fee is per license, which is restricted to user and all the user's websites. You can use it on as many websites as you want, but you are not allowed to distribute or share with others. You can use as you like on any of your own websites.
traxnamibia wrote:4. Lastly, do you have a timeline when you will provide the ability to “Upload, move, copy and delete files” ( *coming soon! )
Big update coming in 1-2 months, primarily updating existing features and interface. File-manager features, I can't quite say to be honest, but I expect Autumn 2021.
 
traxnamibia
Posts: 2
Joined: Today, 08:16

Re: Images not caching? please help

Today, 11:10

Amazingly quick response!

Just as you were typing, I was reinstalling php-gd using Easy Apache on WHM/cPanel. 
It fixed the issue, but I fail to understand why it wasn't working before. 

So - for other users on cPanel with the smae issue, you might need to re-run EasyApache.