Image Optimization Akeneo Connector for TwicPics

Deliver perfectly optimized images from your Akeneo PIM to your websites and apps in a blink of an eye.

Introduction

What is TwicPics?

TwicPics is a real-time media processing service that enables developers and companies of all sizes to deliver rich and optimized visual content to their website.

TwicPics is more precisely a Responsive Image Service Solution (SaaS). It offers on-demand responsive image generation combined with a well-thought-out and unobtrusive JavaScript library, all based around a URL-based API.

With the help of the Image Optimization Akeneo Connector for TwicPics, you can define your PIM as the source of your assets to serve perfectly optimized images to your websites and apps through TwicPics.

akeneo-connector-1

Want to know more about TwicPics? Click here for more information.

Requirements

The Image Optimization Akeneo Connector for TwicPics requires you to:

  • Own an account (PIM) on Akeneo
  • Own an account on TwicPics
  • Set up the connections between your accounts, on both your Akeneo PIM and your TwicPics back-office
For now and by default, the option of using Akeneo as a source authentication for image optimization does not appear on the TwicPics back-office. After  creating your TwicPics account , contact us to activate the option in your TwicPics back office.

The Image Optimization Akeneo Connector for TwicPics works with the Akeneo versions 1.7, 2.x, 3.x, 3.2, 4.0, 5.0, SaaS, depending on which image types you need to request from your Akeneo PIM.

Supported image types

The Image Optimization Akeneo Connector for TwicPics can get and optimize these following image types from your Akeneo PIM to your websites and apps:

Features & benefits

The Image Optimization Akeneo Connector for TwicPics allows you to benefit from the same features as if you were using TwicPics in the standard way.

  • Image resizing and DPR: TwicPics automatically detects the DPR of your visitors. It means we automatically size your existing and future images at the correct DPR for any device.
  • Lazy loading: TwicPics automatically defers offscreen images to improve page loading time. It also offers images placeholders functionality to deliver a better user experience.
  • Many image formats processing: TwicPics supports non-animated AVIF, GIF, HEIF, JPEG, PNG and WebP formats.
  • Next-Gen format and WebP conversion: by default, and for better optimization, TwicPics automatically converts your images to WebP format for all compatible devices.
  • Lossless compression: TwicPics automatically removes useless data and compresses images on the fly. Reduce image size by up to 75% without compromising its quality.
  • SEO optimizations
  • Global CDN: serve your images closer to your visitors thanks to a worldwide CDN powered by Amazon™.
  • Rock solid architecture: 99.999% service uptime and 99.99% image delivery success on average.

Akeneo PIM setup

The very first step to install the Image Optimization Akeneo Connector for TwicPics is to create a "connection" from your PIM interface. Refer to the complete documentation of Akeneo to see how you can create the "connection" that will connect TwicPics to your Akeneo PIM, or apply these following steps:

  1. From your Akeneo PIM interface, click on Connect.
  2. Then on Connection settings.
  3. Click on the button Create that will redirect you to the "connection" creation form.
  4. Here in the Label field, enter the name of the connector - this name could be TwicPics or TwicPics connector.
  5. Choose the Flow type of your "connection" (see the official documentation for more information).
  6. Grab your "connection" credentials (Client Id, Secret, Username and Password). Through the header authentication of the connector, they will be used to authenticate TwicPics' calls to Akeneo API and get your images from your PIM.
akeneo-connector-2
  1. Set the proper permissions for both the user role and the user group (see the official documentation for more information).

TwicPics account setup

Create your TwicPics account

If you don't have any TwicPics account yet, you can easily sign up here for free.

Sign in to your brand new account and go to the "Domains" section: you can see it comes with a domain akin to <sub>.twic.pics that TwicPics already set up for you.

akeneo-connector-3

Connect your TwicPics domain to your Akeneo PIM

From the "Domains" section of your TwicPics back-office, click on the Add new path button located at the far right of your domain name.

A popup window will open, in which you must set the URL of your Akeneo PIM as the Source URL.

For instance, if your Akeneo PIM is located at https://<your-pim-subdomain>.akeneo.com then the Source URL must be set to https://<your-pim-subdomain>.akeneo.com.

akeneo-connector-4

Then, select the Akeneo Connector option as the source authentication to fetch your images from your Akeneo PIM.

akeneo-connector-5

And fill in the credentials of your TwicPics connector (grabbed from your Akeneo PIM) in the dedicated fields.

akeneo-connector-6

Click on the Add button located at the bottom right of the popup window: the newly created connection between your TwicPics domain and your Akeneo PIM now appears in the list of paths.

From now on, you can begin integrating and optimizing your Akeneo PIM images to your websites and apps with TwicPics.

Integrate your PIM images

Here are the three endpoints you can use to integrate and optimize your Akeneo PIM images with TwicPics, through the Image Optimization Akeneo Connector for TwicPics:

  1. Products media files endpoint: /media/<media-code>
    • TwicPics image URL: https://<your-sub>.twic.pics/media/<media-code>
    • Will point to Akeneo API: https://<your-pim-subdomain>.akeneo.com/api/rest/v1/media-files/{code}/download
  2. Assets media files endpoint: /asset/<asset-family>/<media-code>
    Due to the behavior of Akeneo API, you must indicate the name of the asset family to get the asset media file.
    • TwicPics image URL: https://<your-sub>.twic.pics/asset/<asset-family>/<media-code>
    • Will point to Akeneo API: https://<your-pim-subdomain>.akeneo.com/api/rest/v1/asset-media-files/{code}
  3. Reference entities or records media files endpoint: /reference-entity/<media-code>
    • TwicPics image URL: https://<your-sub>.twic.pics/reference-entity/<media-code>
    • Will point to Akeneo API: https://<your-pim-subdomain>.akeneo.com/api/rest/v1/reference-entities-media-files/{code}

As an example, let's say:

  • your TwicPics domain is https://my-company.twic.pics/
  • your Akeneo PIM domain is https://my-company.akeneo.com/
  • and the image to optimize is a product media file from your Akeneo PIM, whose code is 5/9/z/2/43z8b1586_DEMO_IMAGE.jpg

Then the image URL to integrate on your website is:
https://my-company.twic.pics/media/5/9/z/2/43z8b1586_DEMO_IMAGE.jpg

And the forwarded request made to Akeneo API to get the image is:
https://my-company.akeneo.com/api/rest/v1/media-files/5/9/z/2/43z8b1586_DEMO_IMAGE.jpg/download

To integrate your images on your websites and apps, you can either use the TwicPics script to automatically adapt your PIM images to your users or the API if you prefer writing manual request optimizations.

The example below shows a PIM image integration with the TwicPics script:

<img
  data-twic-src="image:media/5/9/z/2/43z8b1586_DEMO_IMAGE.jpg"
  alt="Demo image"
/>
You can refer to our documentation for more information about the script setup .

Here the example makes use of TwicPics API to integrate the PIM image:

<img
  src="https://my-company.twic.pics/media/5/9/z/2/43z8b1586_DEMO_IMAGE.jpg?twic=v1/cover=16:9/resize=600"
  alt="Demo image"
/>
Refer to our API documentation to see every possible transformation you can manually apply to your Akeneo PIM images.

Support service

For any issue related to the Image Optimization Akeneo Connector for TwicPics, please contact the support team by sending an email at support@twic.pics.

Check out our Service Level Agreement to get more information about our different services.

responsive images

The All-In-One Toolbox For Your Images

The simplest, most powerful way to tackle responsive images