shredbx logo
shredbx shredbx shredbx shredbx Personal
  • Home
  • Lab
  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
AClaude
  • Home
  • Lab
  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
Andrei Solovev
Packages
Search packages... ⌘K
  • Data & Persistence
    • Databases 3
    • Object Storage 1
    • File Formats 2
    • Enumerations 2
    • Content 1
    • Codegen 2
  • System Integration
    • Secrets 1
    • CLI Tools 5
    • Media Processing 2
    • Adapters 2
  • UI & Components
    • Primitives 1
    • Blocks 1
    • Sections & Layouts 1
    • Entities 1
    • Media 1
    • Utilities 1
    • State & Presenter 1
    • Branding & Style 1
  • Game Engine
    • Framework 1
    • Engine 2
    • Presets 1
    • Vendor 1
Packages/ System Integration/ Media Processing/ Webassets
Go Package

webassets

Image processing pipeline — resize, optimize, format conversion via sips/ImageMagick

Go Ready SI
Image Processing Pipeline
$ proc := webassets.NewProcessor(store)
[webassets] backend: sips (macOS)
$ proc.Resize(ctx, "hero.jpg", 1920, 1080)
[resize] hero.jpg 3840x2160 -> 1920x1080
[resize] hero_1920x1080.jpg — 487 KB
$ proc.Convert(ctx, "hero_1920x1080.jpg", webassets.WebP)
[convert] jpg -> webp (quality: 85)
[convert] hero_1920x1080.webp — 198 KB (59% reduction)
$ proc.Optimize(ctx, "hero_1920x1080.webp", 80)
[optimize] 198 KB -> 162 KB (18% reduction)

About

Processes web images through a configurable pipeline: resize to target dimensions, optimize file size, and convert between formats. Uses macOS sips for local development and ImageMagick for production containers.

Public API

NameKindSignature
Processortypetype Processor struct
NewProcessorfuncfunc NewProcessor(store *storage.Client, opts ...ProcessorOption) *Processor
Resizefuncfunc (p *Processor) Resize(ctx context.Context, src string, width, height int) (string, error)
Optimizefuncfunc (p *Processor) Optimize(ctx context.Context, src string, quality int) (string, error)
Convertfuncfunc (p *Processor) Convert(ctx context.Context, src string, format Format) (string, error)

Dependencies

Imports (2)

external Go Ready

External process runner — exec.Command wrapper with timeout, output capture, error handling

execprocess-runnertimeoutoutput-capture
5 exports 7 deps
storage Go Ready

R2-compatible object storage — upload, download, presigned URLs

r2s3-compatibleobject-storagepresigned-urls
5 exports 3 deps

Related Packages

storage Go Ready

R2-compatible object storage — upload, download, presigned URLs

r2s3-compatibleobject-storagepresigned-urls
5 exports 3 deps
pdf Go Ready

PDF generation — HTML-to-PDF rendering with template support

pdfhtml-to-pdftemplatesrendering
4 exports 1 deps
external Go Ready

External process runner — exec.Command wrapper with timeout, output capture, error handling

execprocess-runnertimeoutoutput-capture
5 exports 7 deps

Source

github.com/shredbx/sbx-core/pkg/webassets
imagesresizeoptimizationsipsimagemagick
shredbx logo shredbx shredbx shredbx shredbx Andrei Solovev

Solution Architect & Lead Software Engineer

ExperiencePortfolioResearch & ExperimentsEducationCertificationSkills
GitHub ↗LinkedIn ↗Email ↗
AVAILABLE FOR NEW PROJECTS
// MY LATEST BEATS
Hobby & Interests

Lab

  • The Lab
  • Framework
  • Components
  • Packages
  • Games
  • Process (SDLC)
  • Knowledge
  • Blog

Andrei

  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
  • Lifestyle

Team

  • Team
  • Andrei
  • Claude

Legal

  • Privacy
  • Terms
  • Cookies
© 2026 shredbx.com. All rights reserved. — Andrei Solovev |