Cannot upload image using gd_lib on codeigniter with jpeg type

beanime.xyz

why when I upload an image I can’t upload an image using gd_lib on codeigniter with jpeg type, even though before that it can be uploaded smoothly.
Thanks

Error Message

this my code :

 "title": "CodeIgniter\\Images\\Exceptions\\ImageException",
    "type": "CodeIgniter\\Images\\Exceptions\\ImageException",
    "code": 500,
    "message": "Your server does not support the GD function required to process this type of image. images.jpgNotSupported",
    "file": "/home/vol14_1/epizy.com/epiz_26194825/beanime.xyz/htdocs/system/Images/Exceptions/ImageException.php",
    "line": 40,
    "trace": [
        {
            "file": "/home/vol14_1/epizy.com/epiz_26194825/beanime.xyz/htdocs/system/Images/Handlers/GDHandler.php",
            "line": 432,
            "function": "forInvalidImageCreate",
            "class": "CodeIgniter\\Images\\Exceptions\\ImageException",
            "type": "::",
            "args": [
                "images.jpgNotSupported"
            ]
        },
        {
            "file": "/home/vol14_1/epizy.com/epiz_26194825/beanime.xyz/htdocs/system/Images/Handlers/GDHandler.php",
            "line": 388,
            "function": "getImageResource",
            "class": "CodeIgniter\\Images\\Handlers\\GDHandler",
            "type": "->",
            "args": [
                "/tmp/php8yJ2Gg",
                2
            ]
        },
        {
            "file": "/home/vol14_1/epizy.com/epiz_26194825/beanime.xyz/htdocs/system/Images/Handlers/GDHandler.php",
            "line": 234,
            "function": "createImage",
            "class": "CodeIgniter\\Images\\Handlers\\GDHandler",
            "type": "->",
            "args": []
        },
        {
            "file": "/home/vol14_1/epizy.com/epiz_26194825/beanime.xyz/htdocs/system/Images/Handlers/GDHandler.php",
            "line": 191,
            "function": "process",
            "class": "CodeIgniter\\Images\\Handlers\\GDHandler",
            "type": "->",
            "args": [
                "resize"
            ]
        },
        {
            "file": "/home/vol14_1/epizy.com/epiz_26194825/beanime.xyz/htdocs/system/Images/Handlers/BaseHandler.php",
            "line": 298,
            "function": "_resize",
            "class": "CodeIgniter\\Images\\Handlers\\GDHandler",
            "type": "->",
            "args": [
                false
            ]
        },
        {
            "file": "/home/vol14_1/epizy.com/epiz_26194825/beanime.xyz/htdocs/app/Controllers/Admin/Subs.php",
            "line": 103,
            "function": "resize",
            "class": "CodeIgniter\\Images\\Handlers\\BaseHandler",
            "type": "->",
            "args": [
                50,
                50
            ]
        },
        {
            "file": "/home/vol14_1/epizy.com/epiz_26194825/beanime.xyz/htdocs/system/CodeIgniter.php",
            "line": 914,
            "function": "update",
            "class": "App\\Controllers\\Admin\\Subs",
            "type": "->",
            "args": [
                "36"
            ]
        },
        {
            "file": "/home/vol14_1/epizy.com/epiz_26194825/beanime.xyz/htdocs/system/CodeIgniter.php",
            "line": 400,
            "function": "runController",
            "class": "CodeIgniter\\CodeIgniter",
            "type": "->",
            "args": [
                {
                    "session": {},
                    "sub": {
                        "pager": null
                    },
                    "config": {
                        "upload_path": "./images/"
                    },
                    "dimensions": [
                        "50",
                        "90",
                        "150",
                        "200"
                    ]
                }
            ]
        },
        {
            "file": "/home/vol14_1/epizy.com/epiz_26194825/beanime.xyz/htdocs/system/CodeIgniter.php",
            "line": 308,
            "function": "handleRequest",
            "class": "CodeIgniter\\CodeIgniter",
            "type": "->",
            "args": [
                null,
                {
                    "handler": "file",
                    "backupHandler": "dummy",
                    "storePath": "/home/vol14_1/epizy.com/epiz_26194825/beanime.xyz/htdocs/writable/cache/",
                    "cacheQueryString": false,
                    "prefix": "",
                    "memcached": {
                        "host": "127.0.0.1",
                        "port": 11211,
                        "weight": 1,
                        "raw": false
                    },
                    "redis": {
                        "host": "127.0.0.1",
                        "password": null,
                        "port": 6379,
                        "timeout": 0,
                        "database": 0
                    },
                    "validHandlers": {
                        "dummy": "CodeIgniter\\Cache\\Handlers\\DummyHandler",
                        "file": "CodeIgniter\\Cache\\Handlers\\FileHandler",
                        "memcached": "CodeIgniter\\Cache\\Handlers\\MemcachedHandler",
                        "predis": "CodeIgniter\\Cache\\Handlers\\PredisHandler",
                        "redis": "CodeIgniter\\Cache\\Handlers\\RedisHandler",
                        "wincache": "CodeIgniter\\Cache\\Handlers\\WincacheHandler"
                    }
                },
                false
            ]
        },
        {
            "file": "/home/vol14_1/epizy.com/epiz_26194825/beanime.xyz/htdocs/index.php",
            "line": 45,
            "function": "run",
            "class": "CodeIgniter\\CodeIgniter",
            "type": "->",
            "args": []
        }
    ]
}

I am not as fluent in PHP as many other languages, but i believe it could be down to 2 things,
a, You cannot use the /tmp directory.
b, This may be due to https://stackoverflow.com/questions/16915016/your-server-does-not-support-the-gd-function-required-to-process-this-type-of-im
or Due to the Jpeg Library which some people say may not be installed.

This may be due to a large bug fix rolled out yesterday, and i think a few people said that some php addons had dissapeared

3 Likes

this seems to explain the problem, why is the jpeg format in my php info missing.

I had tried to input an image with png format type and it worked and not for jpeg format type images.

then how to overcome this problem. is there any solution ?

As i said before, I believe that it just isn’t installed.

And on free hosting, there is unfotunately no way you can solve this, you can only use a different format

Just use a different format? Png or Webp

I suggest using Webp format for web images. It is meant really for web. It is high quality, fast-to-render and small in file size(useful for file size limits).

Nowadays, webp is mostly used for better and fast images.

1 Like

strong textpeople, the infinity free is not uploading folder, fix it

Please make a new topic for that, so we could help you more further!

This post was flagged by the community and is temporarily hidden.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.