L
L
lakegull2016-03-01 22:27:18
Images
lakegull, 2016-03-01 22:27:18

How to prevent the creation of images of different sizes (clones of the original) when importing?

When importing images, a huge number of thumbnails are created, with parameters that I did not order.
The settings are as follows:
31da2db2ac504627ba5cb4c9954ec399.jpg
Next, the picture.jpg file is loaded with dimensions 2592x1936.
As a result, the following set of files appears in the uploads folder:
666be6ec13bf4a358dee8499c9cada4d.jpg
The task is to completely disable automatic thumbnail creation. Only the original is needed. How to do it? Maybe there is a plugin for this purpose?
ps
functions.php

/*--------------------------------*/
    /*	Register Post Thumbnails
    /*--------------------------------*/
    // Entry Image Sizes
    if ( !empty( $bpxl_travelista_options['bpxl_entry_img_width'] ) ) {
        $bpxl_entry_img_width = $bpxl_travelista_options['bpxl_entry_img_width'];
    } else {
        $bpxl_entry_img_width = '738';
    }
    if ( !empty( $bpxl_travelista_options['bpxl_entry_img_height'] ) ) {
        $bpxl_entry_img_height = $bpxl_travelista_options['bpxl_entry_img_height'];
    } else {
        $bpxl_entry_img_height = '355';
    }
    // Widgets Thumbnail Sizes
    if ( !empty( $bpxl_travelista_options['bpxl_widgets_img_width'] ) ) {
        $bpxl_widgets_img_width = $bpxl_travelista_options['bpxl_widgets_img_width'];
    } else {
        $bpxl_widgets_img_width = '65';
    }
    if ( !empty( $bpxl_travelista_options['bpxl_widgets_img_height'] ) ) {
        $bpxl_widgets_img_height = $bpxl_travelista_options['bpxl_widgets_img_height'];
    } else {
        $bpxl_widgets_img_height = '65';
    }
    // Slider Thumbnail Sizes
    if ( !empty( $bpxl_travelista_options['bpxl_slider_img_height'] ) ) {
        $bpxl_slider_img_height = $bpxl_travelista_options['bpxl_slider_img_height'];
    } else {
        $bpxl_slider_img_height = '500';
    }
    
  add_theme_support( 'post-thumbnails' );
  set_post_thumbnail_size( 150, 150, true );
  add_image_size( 'slider', 1170, $bpxl_slider_img_height, true ); //slider
  add_image_size( 'featured', $bpxl_entry_img_width, $bpxl_entry_img_height, true ); //featured
  add_image_size( 'featuredthumb', 325, 150, true ); //featuredthumb
  add_image_size( 'related', 237, 150, true ); //related
  add_image_size( 'widgetthumb', $bpxl_widgets_img_width, $bpxl_widgets_img_height, true ); //widgetthumb
    
    /*
   * Let WordPress manage the document title.
   * By adding theme support, we declare that this theme does not use a
   * hard-coded <title> tag in the document head, and expect WordPress to
   * provide it for us.
   */

Image settings in themes:
f3cb0b4ef9004714aac75a603a8873ba.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mr Crabbz, 2016-03-01
@lakegull

You have additional dimensions in the topic. Open functions.php and comment out all add_image_size.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question