WP Images OTF Plugin

What does this plugin do?

Author:Adam Brzozowski (profile at wordpress.org)
WordPress version required:3.0
WordPress version tested:4.8.17
Plugin version:1.0.0
Added to WordPress repository:28-06-2017
Last updated:28-06-2017
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:https://github.com/adam-prohack/WP-Images-OTF...
Total downloads:5 393
plugin download
Click to start download

What does this plugin do?

This plugin generate image thumbnails only when site need it, when someone call function with needed size,
and saves disk space when image is uploaded to media library.
You don’t need to use add_image_size() function.

How it works?

  1. Upload image to media library
  2. Change function wp_get_attachment_image_url() to get_otf_image_url() in your wordpress template
  3. When function is invoke the first time, the image is dynamically adjust, create and stored
  4. Page serve image in need size

Documentation

`php
function get_otf_image_url(
    $image_id, $size_name, 
    $width = 0, $height = 0, 
    $crop_mode = ["center", "center"], 
    $mime_type = "image/jpeg", $quality = 70)
`

Parameters

  • Required:
    *$image_id – attachment id
    ***$size_name** – dynamic size name
    ***$width** – image width
    ***$height** – image height
  • Optional
    *$crop_mode – image crop mode
    ***$mime_type** – result image mime type
    ***$quality** – result image quality

Return Value

  • Returns an url string