Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can OSC / STS support .png images?


Guest

Recommended Posts

Hi all,

I have been trying for a couple of hours to get my images to appear on my website, all of my images are .png files, i tried converting an image to a .gif and it displayed correctly.

Does that mean OCS / STS does not support the use of .png images?

If it does support them please could somebody tell me how to enable this as all of my websites images are in .png format.

Many thanks.

Link to comment
Share on other sites

Hi all,

I have been trying for a couple of hours to get my images to appear on my website, all of my images are .png files, i tried converting an image to a .gif and it displayed correctly.

Does that mean OCS / STS does not support the use of .png images?

If it does support them please could somebody tell me how to enable this as all of my websites images are in .png format.

Many thanks.

Png is still not fully supported. It depends on the type of png and the browser. In many cases they can be used though. If you go to http://yoursite.com/images/some_image.png, and it displays, then you can use it in your site.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thanks for the replys guys,

I have placed the images in the http://www.mysite.com/catalog/images directory, im not replacing any default images. I created the files in mspaint in windows vista. Iv never had any problem with my images developing websites normally, its only when i use them with OSC / STS that i have the problem.

do you have any suggestions how i can get around this.

Thanks

Link to comment
Share on other sites

Thanks for the replys guys,

I have placed the images in the http://www.mysite.com/catalog/images directory, im not replacing any default images. I created the files in mspaint in windows vista. Iv never had any problem with my images developing websites normally, its only when i use them with OSC / STS that i have the problem.

do you have any suggestions how i can get around this.

Thanks

 

Lee,

 

Jack is correct in that png images may not be viewable by some of your customers as it is browser dependent.

 

You should upload your STS template images in your template folder as catalog/includes/sts_templates/*your_template_folder/images. You should link to them using $templatedir/images/myimage.png.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Hi thanks for the reply.

Even though .png's are browser dependants is there still a way i can get them to work with this script? As other image types of the same quality are more than quadroople the size.

Im only creating my site to support ie and firefox, both of which i know can support .png's.

Thanks for the $templatedir tip.

Link to comment
Share on other sites

There still may be a few browsers out there that don't support PNG image files, but anything this side of the Stone Age should be at least able to display basic images. Just don't use transparency (alpha channel) in your PNG images, as IE6 and older don't properly support it. Otherwise, anyone running such an ancient browser that doesn't recognize PNG probably deserves whatever happens to them! There's nothing in OSC itself that cares about which image format is used -- indeed, a number of the standard logos and such that ship with OSC are PNG. There's a remote possibility that your site hosting service is doing something that's blocking PNG files -- if you can get them to display on one of your browsers, it's unlikely that's the problem. Does STS look at file types (extensions) and treat one kind of file differently than another? Do you have "hotlink protection" on your site, that might be blocking certain files by extension?

Link to comment
Share on other sites

Does STS look at file types (extensions) and treat one kind of file differently than another?

 

No, STS does not care what image format is used, PNG, JPG, GIF or whatever.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

I've checked the OP's site from time to time.

 

In every single case I've seen either the png image didn't exist (the path/name in the HTML source didn't point to a valid image file) or Firefox would say that the png image was corrupt.

:o

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I've checked the OP's site from time to time.

 

In every single case I've seen either the png image didn't exist (the path/name in the HTML source didn't point to a valid image file) or Firefox would say that the png image was corrupt.

:o

 

Hi, thanks for the replys guys. Iv double checked all the code and the images are there. When i right click and click view image firefox does say the image could not be displayed because it contains errors. Iv never had this before, iv recreated the image on my laptop also and sent it to my pc but tis still the same.

Link to comment
Share on other sites

Most of the time corrupt image files are caused by FTP'ing the images to the server in TEXT or ASCII mode (used for PHP, HTML, CSS, & other "man-readable" files) as opposed to BINARY mode (used for image and other non readable files).

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...