Versions in this module Expand all Collapse all v0 v0.1.1 Dec 3, 2026 v0.1.0 Dec 3, 2026 Changes in this version + var ErrNotFound = errors.New("ogimage: image metadata not found") + func HTML(content string, options ...Options) (template.HTML, error) + func Hash(content string, options Options) string + func ImageURL(value string) (template.HTML, error) + type Actions struct + Generate func(*web.Request, *Service, string) *web.Response + InjectFallback func(*web.Request, *Service, string) (string, error) + RenderScreenshot func(context.Context, *Service, string) (string, error) + type BrowsershotDriver struct + Configure func(*browsershot.Browsershot) + func (d BrowsershotDriver) Capture(ctx context.Context, s Screenshot) ([]byte, error) + type ClearCommand struct + func (*ClearCommand) Description() string + func (*ClearCommand) Name() string + func (*ClearCommand) Run(ctx context.Context, c *console.Console) error + type CloudflareDriver struct + APIToken string + AccountID string + func (d CloudflareDriver) Capture(ctx context.Context, s Screenshot) ([]byte, error) + type Config struct + Actions Actions + BaseURL string + ConfigureScreenshot func(*Screenshot) + Disk string + Driver Driver + Fallback func(*web.Request) (string, error) + Format string + Height int + LockTimeout time.Duration + MaxAge time.Duration + MetadataTTL time.Duration + Path string + PreviewParameter string + Quality int + RemoteDisk bool + ResolveURL func(*web.Request) (string, error) + Width int + type Driver interface + Capture func(context.Context, Screenshot) ([]byte, error) + type DriverFunc func(context.Context, Screenshot) ([]byte, error) + func (f DriverFunc) Capture(ctx context.Context, s Screenshot) ([]byte, error) + type GenerateCommand struct + func (*GenerateCommand) Arguments() []laravel.Argument + func (*GenerateCommand) Description() string + func (*GenerateCommand) Name() string + func (*GenerateCommand) Run(ctx context.Context, c *console.Console) error + type Metadata struct + Height int + URL string + Width int + type Options struct + Format string + Height int + Width int + type Package struct + func New(configure ...func(*Config)) *Package + func (p *Package) Register(app *laravel.Registrar) error + type Render struct + func (Render) Handle(r *web.Request, next web.Next) *web.Response + type Screenshot struct + Delay time.Duration + Format string + Height int + Quality int + Scale float64 + URL string + WaitUntil string + Width int + type ScreenshotLayout struct + Content template.HTML + Head template.HTML + Height int + Width int + type Service struct + func From(ctx context.Context) *Service + func (s *Service) DefaultInjectFallback(r *web.Request, source string) (string, error) + func (s *Service) DefaultRenderScreenshot(ctx context.Context, source string) (string, error) + func (s *Service) DefaultResponse(r *web.Request, filename string) *web.Response + func (s *Service) Generate(ctx context.Context, filename string) error + func (s *Service) GenerateForURL(ctx context.Context, pageURL string, format ...string) (string, error) + func (s *Service) Metadata(ctx context.Context, hash string) (Metadata, bool, error) + func (s *Service) Prepare(r *web.Request, source string) (string, error) + func (s *Service) Response(r *web.Request) *web.Response + func (s *Service) StoreMetadata(ctx context.Context, hash string, metadata Metadata) error + func (s *Service) URL(hash, format string) string