{"id":15050561,"url":"https://github.com/kd2org/fotoo","last_synced_at":"2026-04-01T22:05:38.594Z","repository":{"id":256838277,"uuid":"853054760","full_name":"kd2org/fotoo","owner":"kd2org","description":"Image sharing service in PHP with browser resize (git mirror)","archived":false,"fork":false,"pushed_at":"2025-01-21T13:10:03.000Z","size":2959,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-28T00:09:38.253Z","etag":null,"topics":["image-sharing","image-sharing-website","imgur","php","sqlite"],"latest_commit_sha":null,"homepage":"https://fossil.kd2.org/fotoo/","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kd2org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-09-05T22:51:51.000Z","updated_at":"2026-01-13T18:42:03.000Z","dependencies_parsed_at":"2024-09-13T10:24:03.351Z","dependency_job_id":"77d77afa-90f4-4383-a2f0-1a22ed6f10b9","html_url":"https://github.com/kd2org/fotoo","commit_stats":null,"previous_names":["kd2org/fotoo"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kd2org/fotoo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kd2org%2Ffotoo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kd2org%2Ffotoo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kd2org%2Ffotoo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kd2org%2Ffotoo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kd2org","download_url":"https://codeload.github.com/kd2org/fotoo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kd2org%2Ffotoo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["image-sharing","image-sharing-website","imgur","php","sqlite"],"created_at":"2024-09-24T21:27:19.415Z","updated_at":"2026-04-01T22:05:38.564Z","avatar_url":"https://github.com/kd2org.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fotoo\n\nFotoo (previously Fotoo Hosting) is a script aimed to be used as a image hosting web-service, like imgur and others.\n\n## Features\n\n* Tech: PHP 7.4+ (tested with 7.4 to 8.3), SQLite3, HTML, CSS, vanilla Javascript\n* Lightweight, fast\n* Images are resized in the browser before upload:\n  * zero computing resource taken on server\n  * image upload is faster for the user\n  * less data usage on mobile plans!\n  * fallback to server resize for clients without javascript\n* Accepts WEBP, JPEG, PNG, SVG and GIF (even animated GIF files and transparent PNGs)\n* Preview before upload\n* Fast static image view\n* Can upload multiples pictures at a time (albums)\n* Small thumbnail created for each picture\n* Can associate a title to each picture\n* List of the pictures hosted\n* Can make an album private (won't appear in list)\n* Easy deletion of pictures\n* Short URL for images, for use with twitter-like websites\n* Easy integration of pictures in forums and blogs, using either BBcode or HTML\n* Fast resize using the best engine available (from either IMlib, Imagick or GD)\n* Configuration can be easily changed\n* Intelligent image resize for GIF and PNG files (if created thumb is too big (\u003e50KB) then the thumb will be made in JPEG to keep small image size)\n* Supports IP address banning to protect from spammers\n\n## Demo\n\nDemo: [i.kd2.org](https://i.kd2.org/) (upload is disabled)\n\n![Screenshot](screenshot.jpg)\n\n## Install guide\n\nJust download the [fotoo.php](/doc/trunk/fotoo.php) file, rename it to `index.php`, and place it in an empty directory of your web server, and open it in your web browser.\n\nYou will need php7.4-sqlite3 for the database and php7.4-imagick for the image resizing, but you can also use php7.4-gd (slower).\n\n## Upgrade guide\n\nMigration from versions 2.0.x to 2.1.x require a small upgrade to the database schema, see changelog notes below.\n\nOther versions don't require anything.\n\n## ChangeLog\n\n### 3.2.2 (September 2024)\n\n* Delete album when all images in album have been deleted\n* Allow to add new images to an album\n\n### 3.2.1 (September 2024)\n\n* Fix resize using max_width (thanks @Opitux)\n\n### 3.2.0 (September 2024)\n\n* Add support for copy/pasting images directly\n* Add support for drag and dropping images\n* Improve position and size of previous/next buttons when viewing an image\n\n### 3.1.0 (June 2023)\n\n*  Simplify albums and single images: merge them for upload and browsing\n*  Ability to add/remove images from upload list\n*  Use WebP by default for smaller images\n*  Improve UI/UX\n*  Add ability to define an expiry for albums and images\n*  Thumbnail is now generated by the browser as well (zero server load!)\n*  Better handling of SVG and transparent PNG/WebP images\n*  When navigating in images of an album after upload, keep the session key in URL so that individual images can be deleted\n\n### 2.2.0 (May 2020)\n\n*  Add ability to download an album as a ZIP file\n\n### 2.1.1 (march 2016)\n\n*  Fix BBcode for albums\n\n### 2.1.0\n\nUPGRADE! To upgrade your local database open it with SQLite3 client and enter:\n\u003cpre\u003eALTER TABLE pictures ADD COLUMN ip TEXT NULL;\u003c/pre\u003e\n\nThis will add a new column necessary for the new IP storage.\n\n*  Allow to remove multiple images or albums at once (admin mode)\n*  Now storing IP address of uploaders\n*  Automatic IP storage expiration (to remove IP addresses after X days according to local laws)\n*  IP banning (supports masks, wildcards and IPv6) in local configuration\n\n### 2.0.1\n\n*  Fix: Don't force Imagick use\n*  Fix: JS bug fix in single file upload when selected file was changed\n*  Fix: password security in javascript\n\n### 2.0.0\n*  Complete rewrite and redesign using client-side Javascript/Canvas/HTML5 resize\n*  Ability to upload multiple pictures at a time in albums\n*  Admin mode is easier to use\n\n### 1.0.0\n*  Initial release with Flash-based client resize and upload\n\n## License\n\nThis software is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis software is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with this software. If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n\n## FAQ\n\n### What is the password to login and delete pictures and albums?\n\nThe default password is `fotoo`, to change it follow the next question and change:\n\n```\n$config-\u003eadmin_password = 'fotoo';\n```\n\nto the password you like the most.\n\n### How can I change the configuration of the software?\n\nDownload the [`config.example.php` file](/doc/trunk/config.example.php), rename it to `config.php`, and edit it to suit your needs, by un-commenting the lines you want to change.\n\n### How can I change the style?\n\nJust create a file named style.css in the same directory as the application.\n\n### How can I change the maximum file size?\n\nThe best way to do this is to edit the .htaccess in the directory where you installed the software and add this:\n\n```\nphp_value upload_max_filesize 8M\n```\n\nChange 8M by the size you want to allow (see the [PHP FAQ](http://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes) to know what notations are allowed).\n\nPlease note that you'll be also limited by the [post_max_size](http://www.php.net/manual/en/ini.core.php#ini.post-max-size) value, which you might need to change too:\n\n```\nphp_value upload_max_filesize 16M\nphp_value post_max_size 16M\n```\n\nBy default, Fotoo will take as the size limit the smallest value of those configuration directives.\n\n### Hint: upload pictures from the command line\n\nIf you want to upload a picture from your computer to your Fotoo instance, you'll need curl and to use this command:\n\n```\ncurl -i -F name=\"Image title\" -F private=0 -F upload=@mypicture.jpg http://fotoo.example.com/?upload | grep '^Location' | sed 's/^Location: //'\n```\n\nReplace `\"Image title\"` and `\"mypicture.jpg\"` with your own image title and image file. Replace `private=0` with `private=1` to tell Fotoo to hide the picture from the public gallery.\n\n### Hint: enable user cache so that clients don't make a lot of requests\n\nWrite this into the .htaccess of the directory where you installed this software:\n\n```\n\u003cFilesMatch \"\\.(jpg|png|gif)$\"\u003e\n  FileETag none\n\n  ExpiresActive on\n  ExpiresDefault \"access plus 90 days\"\n\u003c/FilesMatch\u003e\n```\n\nYou'll need to have mod_expire enabled.\n\n### How can I have good looking URLs like you have on i.kd2.org?\n\nPretty easy, add this to your config.php:\n\n```\n$config-\u003eimage_page_url = substr($config-\u003eimage_page_url, 0, -1);\n$config-\u003ealbum_page_url = substr($config-\u003eimage_page_url, 0, -2) . 'a=';\n```\n\nAnd add this to the .htaccess in the directory where you have put the software:\n\n```\nRewriteEngine On\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteRule ^(.*) /index.php?$1 [QSA,L]\n```\n\nYou might need to change the `/index.php` path if you're not at the root. eg. if you put the software in `http://example.com/hosting/` you will have to change `/index.php` to `/hosting/index.php`.\n\n### How can I restrict upload access by login/password?\n\nIt's easy, create the config file (see above), find the line with this:\n\n```\n#$config-\u003eallow_upload = true;\n```\n\nAnd replace it with this:\n\n```\n$config-\u003eallow_upload = 'check_upload_access';\n\nfunction check_upload_access()\n{\n    $username = 'fotoo';\n    $password = 'abcd';\n\n    if (isset($_SERVER['PHP_AUTH_USER']) \u0026\u0026 isset($_SERVER['PHP_AUTH_PW'])\n        \u0026\u0026 $_SERVER['PHP_AUTH_USER'] == $username \u0026\u0026 $_SERVER['PHP_AUTH_PW'] == $password)\n    {\n        return true;\n    }\n    else\n    {\n        header('WWW-Authenticate: Basic realm=\"FotooHosting\"');\n        header('HTTP/1.0 401 Unauthorized');\n        die(\"Unauthorized access forbidden!\");\n    }\n}\n```\n\nDon't forget to replace username and password with your own.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkd2org%2Ffotoo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkd2org%2Ffotoo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkd2org%2Ffotoo/lists"}