Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/13 create alt sizes for uploaded files #15

Merged
merged 11 commits into from
Apr 4, 2024

Conversation

fullerzz
Copy link
Owner

@fullerzz fullerzz commented Apr 4, 2024

Changes

  • New file resizer.go containing functions responsible for creating new alt sized images on disk
  • At the end of the saveFile function in main.go, the new function createAltSizes is invoked in a goroutine

createAltSizes

Decodes the jpeg image and calls writeNewImg to create 2 new files at 1/4 and 1/10 scales.

writeNewImg

Creates new file on disk at scale specified in input parameter.

Known Issue

This only works with jpeg files currently. Same with the getAvif functionality (#10). Will address in future.

@fullerzz fullerzz linked an issue Apr 4, 2024 that may be closed by this pull request
@fullerzz fullerzz added the enhancement New feature or request label Apr 4, 2024
@fullerzz fullerzz merged commit 02a5292 into main Apr 4, 2024
1 check passed
@fullerzz fullerzz deleted the feat/13-create-alt-sizes-for-uploaded-files branch April 4, 2024 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Alt Sizes for Uploaded Files
1 participant