Hello everyone, i've problem about broken image uploading. In this issue image was broken preview and uploaded state in uploading sequence. I appreciate any help. Thanks in advance.
Our system:
uname -a
Linux centos6 2.6.32-71.29.1.el6.x86_64 #1 SMP Mon Jun 27 19:49:27 BST 2011 x86_64 x86_64 x86_64 GNU/Linux
ruby -v
ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]
gem -v
1.8.11
Wagn v. 1.7.1 install at Nov 17 14:13 via git.
After small investigation about problem i've realized that when i'm upload an image (example i.png) wagn search for filename i_medium.png after upload. Because this handling wagn cannot find i.png both preview and uploaded state.
If i run this command
mv ./public/card_images/0000/0007/i.png ./public/card_images/0000/0007/i_medium.png
i'm reaching mentioned file manually.
Hi. You're correct, the issue is with image resizing. When things are working correctly, several sizes of the images are stored right away. Wagn's error handling definitely needs to improve in this area (we are doing significant work on this functionality for the 1.8 release).
Have you seen this card?:
When all is working properly, Wagn stores several versions of an image: icon, small, medium, large, and full. The preview you see upon uploading an image is the medium size; if that image is broken, there's a good chance that either (a) the image is not getting stored, or (b) the resizing is not happening.
To investigate, look in the directory where the images are stored. By default, this is public/card_images/0000/####/.
If there are no images stored there at all, make sure the permissions are correct on the directory (the user running the server needs write permissions).
If there is only the original image, with no resized versions, you probably have an issue with your resizing gem. As of Wagn 1.6, Wagn is now explicitly requiring the image_science gem, whereas previously you could also use rmagick. You can still get rmagick working by editing the Gemfile, but this installation is generally considerably more complicated.
If both the image_science gem and the ruby_inline gem on which it depends are correctly installed, odds are that your issue with freeimage, the other (non-gem) library on which image_science depends. We hope to include more detail about installing freeimage here soon, but in the meantime, we hope that this will be enough of a lead for you to find the solution.
This command has been useful in getting freeimage working on machines running debian linux and derivatives:
sudo aptitude install libfreeimage3 libfreeimage3-dev
I would start there :)