CGSmartImage with Fancybox returns corrupt file

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
rodfarias
New Member
New Member
Posts: 4
Joined: Thu Aug 01, 2013 3:07 pm

CGSmartImage with Fancybox returns corrupt file

Post by rodfarias »

Hello.
I'm trying to implement a gallery of images with CGSmartImage and jquery Fancybox. Documentation for CGSmartImage give the following example, including any filters:

Code: Select all

<a rel='simple_album' class="fancybox" href="{CGSmartImage src=$file notag=1 noembed=1}">
{CGSmartImage src=$file}
</a>
The thumbnail is generated OK, but the large file is not displayed in the popup as an image, but as a ugly sequence of characters.
The problem is that Fancybox displays correctly the file if you provide the appropriate extension (jpg, png ...), but CGSmartImage sent from its cache a renamed file without any extension.
My solution was to skip CG for large image and leave the code like this:

Code: Select all

<a rel='simple_album' class="fancybox" href="{CGSmartImage src=$file notag=1 noembed=1}">
<img href="{$file}" />
</a>
However, I want to know what mistake I'm making and why the example of the documentation not works, in order to use CG with both images.

Thanks.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: CGSmartImage with Fancybox returns corrupt file

Post by calguy1000 »

set the fancybox 'type' property to 'image'.
fancybox uses the file extension to try to determine a type.
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.
rodfarias
New Member
New Member
Posts: 4
Joined: Thu Aug 01, 2013 3:07 pm

Re: CGSmartImage with Fancybox returns corrupt file

Post by rodfarias »

Great!
It solved.
Thank you very much.
Post Reply

Return to “Modules/Add-Ons”