CGSmartImage: Name of the cached image file

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

CGSmartImage: Name of the cached image file

Post by urheat »

I have a site and I need to access images that are cached with CGSmartImage. How the file name of the cached image is created? . Like, how do I know that when the original image is named for examle image.jpg and it's cached version is image named ???

If it is meant to be a secret, I need to find an another way ;)
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: CGSmartImage: Name of the cached image file

Post by velden »

My first question would be: "Why do you need to know that?".

The original filename is in the src param of the module en the resulting filename is in the output of it.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: CGSmartImage: Name of the cached image file

Post by calguy1000 »

The output filename is a hash of all of the parameters and data used to generate the image.... if you change the preferences, or change the parameters in the tag, or even change the order of some of the parameters then the file name can be different. There is no (reasonable) way to guess what the output filename will be. However, if you call CGSI exactly the same way 2 times for the same image, it should generate the same filename. If the file by that name already exists, it is not regenerated and the cached copy is used.

CGSmartImage is designed to do 'on display' image processing, there are options to output merely the filename, or the entire 'img' tag. There should be no need to know the algorithm used to generate the filename.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

Re: CGSmartImage: Name of the cached image file

Post by urheat »

Thanks for the answers. I have a website that consists of three different areas. Two of those areas are made with CMSMS but the third is so static that I don't want (or need to use CMSMS). But the problem is, that I need some pictures of the other CMSMS installations. So I think there can be a reasonable need ;)
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: CGSmartImage: Name of the cached image file

Post by velden »

urheat wrote:So I think there can be a reasonable need ;)
I don't agree.

First of all I don't think it's 'fair' to expect a module to serve you while not using it's framework (static pages instead of cmsms).

Then, when those pages are static, how hard would it be to just link to the images in the cache directory of CGSmartImage? The images need to be processed by CGSmartImage (hence cmsms) first of course.

Or consider uploading those static images in the right format.
Or consider using CMSMS for those 'static pages'.
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

Re: CGSmartImage: Name of the cached image file

Post by urheat »

I just told you why I need the file names, 'cause you asked ;) Because it's not possible to get it, I have to think some other ways.

I'll think that I make a cron job that makes smaller images using GD and use those images for my purposes.

Thanks!
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: CGSmartImage: Name of the cached image file

Post by velden »

What I don't understand is when it's a static page, why do you need to change the image sizes? Do the images change? (which would make it less static then)
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

Re: CGSmartImage: Name of the cached image file

Post by urheat »

velden wrote:What I don't understand is when it's a static page, why do you need to change the image sizes? Do the images change? (which would make it less static then)
In this case I mean "the static" means that the content doesn't change so often that it would be wise to use CMS. And the images from the CMSMS sites are shown automatically and randomly. They are like banners.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: CGSmartImage: Name of the cached image file

Post by velden »

I see.

Well note that linking the images from CGSmartImage is not really harder than linking other images. Though the filenames are less obvious, they will not change when you do not change the module call of CGSmartImage (not sure about future upgrades of the module).

So once you link those it will work wouldn't it?
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1978
Joined: Mon Jan 29, 2007 4:47 pm

Re: CGSmartImage: Name of the cached image file

Post by Jo Morg »

urheat wrote:
velden wrote:What I don't understand is when it's a static page, why do you need to change the image sizes? Do the images change? (which would make it less static then)
In this case I mean "the static" means that the content doesn't change so often that it would be wise to use CMS.
Well, I don't know about the wise part, but cached pages are equal to static pages in performance. So I think you are complicating a simple thing. My 2 cents.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

Re: CGSmartImage: Name of the cached image file

Post by urheat »

This conversation is developing quite interesting ;) If I don't use CMSMS, I don't have to update the system and it is cheaper to develop.
Post Reply

Return to “Modules/Add-Ons”