{"id":16215132,"url":"https://github.com/xarg/django-stdimage","last_synced_at":"2025-03-19T09:31:31.537Z","repository":{"id":1380405,"uuid":"1334232","full_name":"xarg/django-stdimage","owner":"xarg","description":"No longer maintained. Refer to this repo: https://github.com/codingjoe/django-stdimage","archived":false,"fork":false,"pushed_at":"2014-10-30T13:17:30.000Z","size":275,"stargazers_count":39,"open_issues_count":2,"forks_count":86,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-11T02:12:55.621Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Anewczs/laconic","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xarg.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2011-02-06T12:28:16.000Z","updated_at":"2023-08-09T14:27:02.000Z","dependencies_parsed_at":"2022-08-16T13:15:12.184Z","dependency_job_id":null,"html_url":"https://github.com/xarg/django-stdimage","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xarg%2Fdjango-stdimage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xarg%2Fdjango-stdimage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xarg%2Fdjango-stdimage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xarg%2Fdjango-stdimage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xarg","download_url":"https://codeload.github.com/xarg/django-stdimage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243982174,"owners_count":20378604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-10T11:14:01.029Z","updated_at":"2025-03-19T09:31:31.267Z","avatar_url":"https://github.com/xarg.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"**Note:** This repo si no longer maintained. Please use this one: https://github.com/codingjoe/django-stdimage\n\n\nDjango Standarized Image Field\n==============================\n\nDjango Field that implement those features:\n\n * Rename files to a standardized name (using object id)\n * Resize images for that field\n * Automatically creates a thumbnail (resizing it)\n * Allow image deletion\n\nInstallation\n------------\n\n    Install latest PIL - there is really no reason to use this package without it\n\n    easy_install django-stdimage\n\n    Put 'stdimage' in the INSTALLED_APPS\n\nUsage\n-----\n\nImport it in your project, and use in your models.\n\nExample::\n\n    [...]\n    from stdimage import StdImageField\n\n    class MyClass(models.Model):\n        image1 = StdImageField(upload_to='path/to/img') # works as ImageField\n        image2 = StdImageField(upload_to='path/to/img', blank=True) # can be deleted throwgh admin\n        image3 = StdImageField(upload_to='path/to/img', variations={'thumbnail': (100, 75)}) # creates a thumbnail resized to maximum size to fit a 100x75 area\n        image4 = StdImageField(upload_to='path/to/img', variations={'thumbnail': (100, 100, True}) # creates a thumbnail resized to 100x100 croping if necessary\n\n        image_all = StdImageField(upload_to='path/to/img', blank=True, variations={'large': (640, 480), 'thumbnail': (100, 100, True)}) # all previous features in one declaration\n\nFor using generated thumbnail in templates use \"myimagefield.thumbnail\". Example::\n\n    [...]\n    \u003ca href=\"{{ object.myimage.url }}\"\u003e\u003cimg alt=\"\" src=\"{{ object.myimage.thumbnail.url }}\"/\u003e\u003c/a\u003e\n    [...]\n\nAbout image names\n-----------------\n\nStdImageField stores images in filesystem modifying its name. Renamed name is set using field name, and object primary key. Also it changes old windows \"jpg\" extesions to standard \"jpeg\".\n\nUsing `image_all` field previously defined (that creates a thumbnail), if an image called myimage.jpg is uploaded, then resulting images on filesystem would be (supose that this image belongs to a model with pk 14)::\n\n    image_all_14.jpeg\n    image_all_14.large.jpeg\n    image_all_14.thumbnail.jpeg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxarg%2Fdjango-stdimage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxarg%2Fdjango-stdimage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxarg%2Fdjango-stdimage/lists"}