# wordpress如何防止上傳圖片時生成多個尺寸圖片

// https://wordpress.stackexchange.com/questions/251789/prevent-wordpress-from-generating-medium-large-768px-size-of-image-uploads

// https://www.narga.net/how-to-disable-image-compression-in-wordpress/
add_filter(‘jpeg_quality’, function($arg){return 0;}); add_filter(‘wp_editor_set_quality’, function($arg){return 0;});

update:很快我就在這裏找到了問題，當wp升級到5.3時（記憶猶深，說不定我還裝過這個版本），增加了一個降低圖片尺寸的功能，如果你傳一張長或寬超過2560px，那就會生成一張較小的圖片。

This is described in more detail here: https://make.wordpress.org/core/2019/10/09/introducing-handling-of-big-images-in-wordpress-5-3/

If you want to disable big image handling, then you have posted the correct filter to use already. There is also a plugin specifically for this purpose: https://wordpress.org/plugins/disable-big-image-threshold/