mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Repository avatar fallback configuration (#7087)
* Only show repository avatar in list when one was selected Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adds fallback configuration option for repository avatar Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Implements repository avatar fallback Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adds admin task for deleting generated repository avatars Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Solve linting issues Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Save avatar before updating database * Linting * Update models/repo.go Co-Authored-By: zeripath <art27@cantab.net>
This commit is contained in:
		
				
					committed by
					
						
						Lunny Xiao
					
				
			
			
				
	
			
			
			
						parent
						
							356854fc5f
						
					
				
				
					commit
					8eba27c792
				
			@@ -292,6 +292,11 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
 | 
			
		||||
   [http://www.libravatar.org](http://www.libravatar.org)).
 | 
			
		||||
- `AVATAR_UPLOAD_PATH`: **data/avatars**: Path to store user avatar image files.
 | 
			
		||||
- `REPOSITORY_AVATAR_UPLOAD_PATH`: **data/repo-avatars**: Path to store repository avatar image files.
 | 
			
		||||
- `REPOSITORY_AVATAR_FALLBACK`: **none**: How Gitea deals with missing repository avatars
 | 
			
		||||
  - none = no avatar will be displayed
 | 
			
		||||
  - random = random avatar will be generated
 | 
			
		||||
  - image = default image will be used (which is set in `REPOSITORY_AVATAR_DEFAULT_IMAGE`)
 | 
			
		||||
- `REPOSITORY_AVATAR_FALLBACK_IMAGE`: **/img/repo_default.png**: Image used as default repository avatar (if `REPOSITORY_AVATAR_FALLBACK` is set to image and none was uploaded)
 | 
			
		||||
- `AVATAR_MAX_WIDTH`: **4096**: Maximum avatar image width in pixels.
 | 
			
		||||
- `AVATAR_MAX_HEIGHT`: **3072**: Maximum avatar image height in pixels.
 | 
			
		||||
- `AVATAR_MAX_FILE_SIZE`: **1048576** (1Mb): Maximum avatar image file size in bytes.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user