Closed thenoblet closed 2 weeks ago
This feature should be discussed with me before implementation. It is not well spec'd out, and this should be revised
Need more details about how this interacts at application level?
Are images not going to be fetched with the specific endpoints like User profile?
@thenoblet
Need more details about how this interacts at application level?
Are images not going to be fetched with the specific endpoints like User profile?
@thenoblet
@highb33kay, Mark suggested this endpoint be created. So I thought images would be stored on the server or a CDN, then served using efficient techniques like caching (which a friend raised a separate issue for #252 after discussing with him) and compression.
For caching, if images are stored on the server, appropriate cache headers can be set to allow browsers and CDNs to cache them. If images are stored in an S3 bucket, with CloudFront, they can be cached based on their unique slugs reducing the load on the origin server(s).
Description
Implement endpoints to serve images in an efficient manner, ensuring fast delivery and optimized performance. This includes handling image compression, resizing, and caching.
Purpose
To provide a seamless and fast experience for users accessing images on the platform by optimizing image delivery.
Acceptance Criteria
Image Serving
Image Upload
Image Retrieval
Requirements
Image Compression and Resizing
Security
Expected Outcome
Checklist
Image Upload and Serving/Retrieval:
Upload Image
Retrieve Image
Testing:
Documentation:
Endpoints
Upload Image
Description: Upload an image to the server.
Endpoint:
POST /api/v1/images/upload
Request (Body):
multipart/form-data
Response (Success):
Response (Error):
Retrieve Image
Description: Retrieve an image by ID, with optional query parameters for size and format. Endpoint:
GET /api/v1/images/{id}
Query Parameters:Response (Success):
Response (Error):