Pixboost
  • Overview
  • Quickstart
  • Tools and Setup
    • Source Images
      • Adding Source Image Domain
      • Adding HTTP Image Source
      • Adding AWS S3 Bucket Image Source
    • Managing API Keys
    • Managing Users
    • Snippet Generator
    • Custom Domain Name
    • Cache Invalidation
    • HTTP/2 Support
    • HTTP/3 Support
  • API. URL-based integration
    • Resize
    • Fit
    • Optimise
    • As is
  • Using with React
  • Shopify Integration
  • Automated Workflows
    • Cache Invalidation
    • Warmup
    • API Secrets
  • Performance Testing
  • Open Source Version
Powered by GitBook
On this page
  • URL pattern for API call
  • Example using <img> tag
  • Example using <picture> tag
  • Resize
  • Fit
  • Optimise
  • As is

Was this helpful?

API. URL-based integration

To make integration easier we provide a lightweight API that you can directly use from HTML code.

URL pattern for API call

All endpoints follow the same pattern

https://pixboost.com/api/2/img/[IMAGE_URL|IMAGES_SOURCE_ALIAS_WITH_PATH]/[OPERATION]?[OPERATION_PARAMS]&auth=[API_KEY]

Item
Description

[IMAGE_URL]

The URL of the original image you would like to process through Pixboost.

[IMAGES_SOURCE_ALIAS_WITH_PATH]

An alias of an images source with relative path to the image.

[OPERATION]

Pixboost function call

[OPERATION_PARAMS]

Operation parameters for a function call you are using

[API_KEY]

Example using <img> tag

Before:

<img src="http://www.midday.coffee/assets/cup.jpeg" alt="Midday Coffee">

After:

<img src="http://pixboost.com/api/2/img/http://www.midday.coffee/assets/cup.jpeg/resize?size=200x100&auth=MTg4MjMxMzM3MA__" alt="Midday Coffee">

Example using <picture> tag

Before:

<picture>
    <source srcset="http://www.midday.coffee/assets/cup.jpeg" 
        media="(min-width: 769px)">
    <source srcset="http://www.midday.coffee/assets/cup.jpeg" 
        media="(max-width: 768px)">
    <source srcset="http://www.midday.coffee/assets/cup.jpeg" 
        media="(max-width: 576px)">
    <img src="http://www.midday.coffee/assets/cup.jpeg">
</picture>

After:

<picture>
    <source srcset="https://pixboost.com/api/2/img/http://www.midday.coffee/assets/cup.jpeg/optimise?auth=API_KEY" 
        media="(min-width: 769px)">
    <source srcset="https://pixboost.com/api/2/img/http://www.midday.coffee/assets/cup.jpeg/resize?size=300&auth=API_KEY" 
        media="(max-width: 768px)">
    <source srcset="https://pixboost.com/api/2/img/http://www.midday.coffee/assets/cup.jpeg/fit?size=100x100&auth=API_KEY" 
        media="(max-width: 576px)">
    <img src="http://www.midday.coffee/assets/cup.jpeg">
</picture>

We support all transformation required for the typical website.

Read more on operations:

PreviousHTTP/3 SupportNextResize

Last updated 1 year ago

Was this helpful?

A unique

You can explore API sandbox here:

Resize
Fit
Optimise
As is
https://pixboost.com/docs/api/
API key