<?php
// Custom sizes of image
if (!function_exists('dueper_image_sizes')) {
  add_action( 'init', 'dueper_image_sizes' );
  function dueper_image_sizes(){
    if ( function_exists( 'add_theme_support' ) ) {
      add_theme_support( 'post-thumbnails' );
    }

    if ( function_exists( 'fly_add_image_size' ) ) {
      //default
      fly_add_image_size( 'thumbnail', 150, 150, true );
      fly_add_image_size( 'medium', 300, 9999 );
      fly_add_image_size( 'large', 1100, 9999 );
      //custom
      fly_add_image_size( 'mini', 60, 60, true );
      fly_add_image_size( 'placeholder', 70, 9999 );
      fly_add_image_size( 'full_hd', 1920, 1080, true );

    } elseif ( function_exists( 'add_image_size' ) ) {
      //custom
      add_image_size( 'mini', 60, 60, true );
      add_image_size( 'placeholder', 70, 9999 );
      add_image_size( 'full_hd', 1920, 1080, true );

    }
  }
}

// JPEG Queity, custom value
if (!function_exists('dueper_qualita_jpeg')) {
  function dueper_qualita_jpeg(){
    $compressione = '85';
    return $compressione;
  }
  add_filter('jpeg_quality', 'dueper_qualita_jpeg' );
}
