CGSmartImage images are not images anymore?

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 images are not images anymore?

Post by urheat »

After updating CGSmartImage to the latest version 1.13 the images that are resized using CGSmartImage are not "images" anymore but "application/octet-stream"?!

Example:

When using Firefox and if I try to view the image that is resized using CGSmartImage, I can't see the image. I'll get an "Save as" dialog which says that if I want to save "application/octet-stream". With Firefox, I can save the image normally.

IE doesn't allow me to view the image and if I try to save it, I'll get an error message.

Not a huge problem, but annoying and ruins a bit the UI.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: CGSmartImage images are not images anymore?

Post by calguy1000 »

CGSmartImage no longer uses file extensions. However, I just tested (both with and without data URI's) and the file is still interpreted properly as an image, and identified with the proper mime type.

Maybe your .htaccess is messing stuff up. Try using the stock one shipped with CMSMS.
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.
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am

Re: CGSmartImage images are not images anymore?

Post by applejack »

calguy1000 wrote: I just tested (both with and without data URI's)
That may depend on your servers configuration. On mine without the data URI they don't work. Any idea as to what Apache's mime types may need configuring.
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

Re: CGSmartImage images are not images anymore?

Post by urheat »

calguy1000 wrote:CGSmartImage no longer uses file extensions. However, I just tested (both with and without data URI's) and the file is still interpreted properly as an image, and identified with the proper mime type.

Maybe your .htaccess is messing stuff up. Try using the stock one shipped with CMSMS.
Thanks calguy!

May I ask why it don't uses file extensions? Can I set module so, that it uses file extensions?

I just updated all my CMSMS sites to 1.11.9 and there was a .htaccess file. So it is "a stock version".

Hopefully the case isn't that, I to have modify htaccess-files, 'cause I think that the modules should work out of the box without tweaking htaccess configurations. a) sometimes the host won't allow it b) resizing images is pretty basic feature that should work easily.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: CGSmartImage images are not images anymore?

Post by calguy1000 »

CGSI no longer uses file extensions primarily because the various filters could result in a jpeg image being converted to a png or vise versa... which had already been reported as a bug. So, no file extension == no bug.

There is nothing in the stock htaccess.txt file that would interfere with CGSI. I asked you to 'check' your .htaccess files incase there were some non-stock rules that may cause problems.

The sample htaccess.txt file shipped with CMSMS was changed in 1.11.9 to expire images at different times based on their mime types instead of their file extension, but that only effects the expiry header.

I verified on a CGSI test page, that with the noembed=1 parameter enabled that the mime-type interpreted by the browser (chrome on linux) was correct.
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 images are not images anymore?

Post by urheat »

calguy1000 wrote:CGSI no longer uses file extensions primarily because the various filters could result in a jpeg image being converted to a png or vise versa... which had already been reported as a bug. So, no file extension == no bug.
Ok. I presume that the module is used for image resizing a lot more than filtering images, so I would assume that if there have to be made a decision based on that, I would choose that there would be file extensions or at least an option to force them.
calguy1000 wrote:There is nothing in the stock htaccess.txt file that would interfere with CGSI. I asked you to 'check' your .htaccess files incase there were some non-stock rules that may cause problems.

The sample htaccess.txt file shipped with CMSMS was changed in 1.11.9 to expire images at different times based on their mime types instead of their file extension, but that only effects the expiry header.
I really don't know what to check. And I haven't modified the htaccess-file. Should I copy htaccess.txt to root .htaccess?

calguy1000 wrote:I verified on a CGSI test page, that with the noembed=1 parameter enabled that the mime-type interpreted by the browser (chrome on linux) was correct.
If you mean that Chrome on Linux allows user to use the image as it should (view & download it), then based on my testing, it doesn't work on more commonly used environments like Windows & Chrome, Firefox and IE.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: CGSmartImage images are not images anymore?

Post by calguy1000 »

Tested in Firefox too.... response mime type is appropriate.
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 images are not images anymore?

Post by urheat »

calguy1000 wrote:Tested in Firefox too.... response mime type is appropriate.
On Linux?
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

Re: CGSmartImage images are not images anymore?

Post by urheat »

I made some testing. Couldn't change the language of the browsers, but I'll explain the results.

I installed fresh 1.11.9 and CGSmartImage module. I resized hockey picture using the module.

Image

Firefox & Windows 7
- Can't view the image. Gives option to save the stream.
- I can save the image as jpg.

Chrome & Windows 7
- Can't save the image. I can save it as txt-file.

IE & Windows 7
- Can't view the image.
- Can't save the image. Error is "denied or not recognized file extension"

Firefox & Mac 10.7.5
- Same as Windows

Chrome & Mac 10.7.5
- Same as Windows.

You are free to test yourself: http://ihmis.web29.neutech.fi/

Hopefully this helps and this bug is fixed in next release.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1978
Joined: Mon Jan 29, 2007 4:47 pm

Re: CGSmartImage images are not images anymore?

Post by Jo Morg »

I checked your link on Windows 7 64:
Opera V12.16 and Firefox V24.0 and both worked as they should. I could see the image and download it as jpg.
IE9 I could see but save was blocked with the message: "The file type being saved or retrieved has been blocked". A typical cryptic MS message that explains nothing.
On Chrome V27, the image shows and can be saved correctly but I have to change the extension from*.txt to *.jpg manually.
Not offering a solution, just adding some more data to see if it helps sorting it.
"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!
Post Reply

Return to “Modules/Add-Ons”