Can't create thumbs using Image Manipulation class |
[eluser]chitoso[/eluser]
Hi all, I've been reading the docs and trying everything to make thumbs out of uploaded images but I can't seem to find the problem. Images are uploaded and saved correctly but thumbs are not, it fails with no error output. This is the code I'm using: Code: $data = $this->upload->data(); Also, I want to resize images to fit max-width=750, but maintain the ratio. Is what I'm doing correct to achive that? Thanks in advance!
[eluser]chitoso[/eluser]
Hey all, I've succesfully developed my first project with CI and I'm really happy with it. One minor problem though, I've come across this issue again and I can't really get around it. Does anyone have a clue on this matter? I'd rather manage this using CI and not an external script like timthumb. Thanks.
[eluser]dstegelman[/eluser]
You need to set the config var ['new_image'] to an actual file, not just the directory. Also that directory needs to be absolute/relative server path.
[eluser]chitoso[/eluser]
rom what I've seen in the docs (http://ellislab.com/codeigniter/user-gui...e_lib.html): "If only the path is specified, the new image will be placed in the destination with the same name as the original.", so I assume this code should work. Code: $config_image['image_library'] = 'gd'; The weird thing is that it fails silently, no errors whatsoever. Any clues?
[eluser]dstegelman[/eluser]
Thats really strange that there are no errors in the log or coming from display_errors(). Have you checked permissions? It appears otherwise that you are doing it by the book so without any more info I can't really think of anything that would solve your issue.
[eluser]chitoso[/eluser]
Thanks anyway. If I get around it I'll make sure to post it For now, timthumb it is.
[eluser]chitoso[/eluser]
Hi all, I hate to revive this thread, but I'm constantly facing this problem in CI and it's really frustrating me Does anyone have a clue on why this might be happening or at least some help to troubleshoot this? Thanks a million.
[eluser]andyy[/eluser]
Try this for testing purposes: Code: // replace this... If you still get nothing ensure that the image is passing properly from the form. Maybe map a static test image from your folder and see if you're generating a thumbnail like that with your script.
[eluser]chitoso[/eluser]
I've followed both your recommendations but it just fails silently. |
Welcome Guest, Not a member yet? Register Sign In |