- Posts: 29
COMMUNITY FORUM
.gif images uploaded as .jpg
- Steve Tustin
- Topic Author
- Offline
- Junior Member
Less
More
14 years 9 months ago #78930
by Steve Tustin
.gif images uploaded as .jpg was created by Steve Tustin
I've got a lot of .gif files with transparency. When I upload them, they appear in the cache as .jpg files and therefore not transparent. Using: J1.5.15 and K2 2.2This looks like they are hardcoded in the backend /administrator/components/com_k2/models/items.php at lines 383-389, lines 427-440 (and probably more)Shouldn't this use something like:From:if (JFile::exists($sourceImage)) JFile::copy($sourceImage, JPATH_ROOT.DS.'media'.DS.'k2'.DS.'items'.DS.'src'.DS.md5("Image".$row->id).'.jpg');To: if (JFile::exists($sourceImage))
JFile::copy($sourceImage,
JPATH_ROOT.DS.'media'.DS.'k2'.DS.'items'.DS.'src'.DS.md5("Image".$row->id).JFile::getExt($sourceImage));
JFile::copy($sourceImage,
JPATH_ROOT.DS.'media'.DS.'k2'.DS.'items'.DS.'src'.DS.md5("Image".$row->id).JFile::getExt($sourceImage));
Please Log in or Create an account to join the conversation.
- Steve Tustin
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 29
14 years 8 months ago #78931
by Steve Tustin
Replied by Steve Tustin on topic .gif images uploaded as .jpg
Does anyone know of a fix for this?
Please Log in or Create an account to join the conversation.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
14 years 8 months ago #78932
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic .gif images uploaded as .jpg
Hi. This cannot be considered as a bug. This is how it was designed to work. All images are converted in jpg format.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Steve Tustin
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 29
14 years 8 months ago #78933
by Steve Tustin
Replied by Steve Tustin on topic .gif images uploaded as .jpg
Whilst not a bug, it seems strange that uploading a non-jpg file gets converted to a jpg and isn't immediately obvious.
I appreciate that this is a rare occasion but could we add this to the list of requests?
Lefteris Kavadas said:Hi. This cannot be considered as a bug. This is how it was designed to work. All images are converted in jpg format.
I appreciate that this is a rare occasion but could we add this to the list of requests?
Lefteris Kavadas said:Hi. This cannot be considered as a bug. This is how it was designed to work. All images are converted in jpg format.
Please Log in or Create an account to join the conversation.
- abcd1234
- Offline
- New Member
Less
More
- Posts: 10
14 years 7 months ago #78934
by abcd1234
Replied by abcd1234 on topic .gif images uploaded as .jpg
Hi,
There are no possibility to conserve the original format of images? Even with a hack?
Thanks
There are no possibility to conserve the original format of images? Even with a hack?
Thanks
Please Log in or Create an account to join the conversation.
- Steve Tustin
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 29
14 years 7 months ago #78935
by Steve Tustin
Replied by Steve Tustin on topic .gif images uploaded as .jpg
AFAIK, not without some hacking. You can get this to work but putting the image into the description of the category/product, but of course you then need to link it manually which is a real PITA.
Please Log in or Create an account to join the conversation.
- Simon Wells
- Offline
- Platinum Member
Less
More
- Posts: 955
14 years 7 months ago #78936
by Simon Wells
Replied by Simon Wells on topic .gif images uploaded as .jpg
Hi Lefteris,
Although not a bug as that was how it was intended to work, could you advise how this can be changed to allow .gif and .png to be used?
Simon
K2Joom.com
Lefteris Kavadas said:Hi. This cannot be considered as a bug. This is how it was designed to work. All images are converted in jpg format.
Although not a bug as that was how it was intended to work, could you advise how this can be changed to allow .gif and .png to be used?
Simon
K2Joom.com
Lefteris Kavadas said:Hi. This cannot be considered as a bug. This is how it was designed to work. All images are converted in jpg format.
Please Log in or Create an account to join the conversation.
- Paulette Nelsen
- Offline
- Junior Member
Less
More
- Posts: 20
14 years 7 months ago #78937
by Paulette Nelsen
Replied by Paulette Nelsen on topic .gif images uploaded as .jpg
I too am stumped with this. The only way around this is for me to disable the K2 css. I don't want to do this, as I really like the k2 layout. Disabled, the .png file is transparent. Enabled, it has the nasty white box around it. I spent over an hour trying to figure out what was wrong with my CS4, or trying to figure out if I was just doing it wrong. Finally I discovered that I was indeed not losing my mind. It was K2. I can disable the css, but jeez.
Please Log in or Create an account to join the conversation.