I have been able to upload images before but now I'm unable to and I'm not sure anything is different, it seemed to happen suddenly. As you can see, permissions are open for the images folder. I can see after attempting an upload that the image is not present in the directory.
If your images folder is chmod 777 which it appears to be, it could be some hosting problem.
Check your php error log for any messages.
Check your hosting error log for any messages.
Any messages in there will at least give us a clue.
burt wrote: ↑Tue Apr 08, 2025 7:59 am
If your images folder is chmod 777 which it appears to be, it could be some hosting problem.
Check your php error log for any messages.
Check your hosting error log for any messages.
Any messages in there will at least give us a clue.
I tried uploading a new favicon and it failed. The favicon directory is also 777 and for good measure I repeated the attempt after setting all files within the directory to 777.
I didn't find any associated messages in the php logs at /var/log/php-fpm or the httpd logs at /var/log/httpd. I'm self hosting on an AWS EC2 instance running Amazon Linux 2023.
I have it figured out: For some reason, Phoenix doesn't like this particular image as a PNG, despite it showing just fine in the browser. I converted it to a JPG and it's working now. Maybe it has something to do with this image having photographic data in it while my others are graphics with only a few colors? Seems like a bug. I'd post the image here but it's highly political and I don't want to upset anyone.
notgreat wrote: ↑Tue Apr 08, 2025 11:10 pm
Phoenix doesn't like this particular image as a PNG,
You might check the size of the image. PHP has limits on the file size. They are configured on a per server basis usually (I think you might be able to configure them per directory). Anyway, a lossless PNG might exceed the size that the server will allow. The lossy JPEG version is probably smaller.
You can talk to your host about changing the file size limits if needed.
Another alternative if it's only one image would be to upload a smaller image with the same name and then use FTP or the host's file manager to copy the larger image overtop it.
notgreat wrote: ↑Tue Apr 08, 2025 11:10 pm
Phoenix doesn't like this particular image as a PNG,
You might check the size of the image. PHP has limits on the file size. They are configured on a per server basis usually (I think you might be able to configure them per directory). Anyway, a lossless PNG might exceed the size that the server will allow. The lossy JPEG version is probably smaller.
You can talk to your host about changing the file size limits if needed.
Another alternative if it's only one image would be to upload a smaller image with the same name and then use FTP or the host's file manager to copy the larger image overtop it.
You're right, it's over 2MB which is way bigger than any of the other images. As I'm self-hosted I could change the limit but I think it's better to switch this one to JPG. Thanks!
14Steve14 wrote: ↑Thu Apr 10, 2025 10:28 am
Why not use something like webp files rather than jpg. They are much smaller and will lead to faster page loading inf you have an image heavy page..