• Hi there,

    in the media.php file under /wp-includes there are some image size declarations (add_image_size) for image sizes I don’t need, e.g. the 1536×1536 and the 2048×2048 px sizes. These images just consume unnecessary space, so I don’t want to create them. Up to now, I have commented out the respective code lines in the media .php file, but with every wordpress update, I need to do this again. Is there a possibility to comment out or delete these specific lines in the .php file?

    Of course, I don’t want to do these delete based on the line number in the .php file, because this might change with the wordpress version as well…

    Likewise, there are also image size declarations for my theme in the functions.php file which I would like to comment out/delete…

    Is this possible with the code snippet plugin or can I only add snippets with it?

    Thanks in advance

Viewing 1 replies (of 1 total)
  • Find out what add_image_size does. Most likely it will add to some array. Then hook in a code snippet shortly after the function call to remove the undesired sizes from that array again.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.