{"id":247,"date":"2025-11-22T03:39:59","date_gmt":"2025-11-22T03:39:59","guid":{"rendered":"https:\/\/muatheme247.com\/?p=247"},"modified":"2026-03-22T21:22:34","modified_gmt":"2026-03-22T14:22:34","slug":"cach-tat-resize-anh-ra-nhieu-kich-thuoc-trong-website-wordpress","status":"publish","type":"post","link":"https:\/\/muatheme247.com\/en\/cach-tat-resize-anh-ra-nhieu-kich-thuoc-trong-website-wordpress\/","title":{"rendered":"C\u00e1ch t\u1eaft resize \u1ea3nh ra nhi\u1ec1u k\u00edch th\u01b0\u1edbc trong website WordPress"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">N\u1ebfu b\u1ea1n d\u00f9ng WordPress l\u00e2u n\u0103m, ch\u1eafc ch\u1eafn t\u1eebng g\u1eb7p tr\u01b0\u1eddng h\u1ee3p: <strong>ch\u1ec9 t\u1ea3i l\u00ean 1 t\u1ea5m \u1ea3nh nh\u01b0ng hosting l\u1ea1i xu\u1ea5t hi\u1ec7n 5\u201310 file \u1ea3nh kh\u00e1c nhau<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u00fang r\u1ed3i, \u0111\u00f3 ch\u00ednh l\u00e0 c\u01a1 ch\u1ebf <strong>WordPress t\u1ef1 \u0111\u1ed9ng t\u1ea1o thumbnail v\u00e0 nhi\u1ec1u k\u00edch th\u01b0\u1edbc \u1ea3nh<\/strong>, nh\u1eb1m t\u1ed1i \u01b0u hi\u1ec3n th\u1ecb cho theme.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Tuy nhi\u00ean, v\u1edbi website c\u00f3 nhi\u1ec1u h\u00ecnh nh\u01b0 blog, tin t\u1ee9c, review, \u0103n u\u1ed1ng, hay trang \u0111\u0103ng s\u1ea3n ph\u1ea9m m\u1ed7i ng\u00e0y, vi\u1ec7c sinh ra qu\u00e1 nhi\u1ec1u size \u1ea3nh s\u1ebd:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>L\u00e0m website <strong>t\u1ed1n dung l\u01b0\u1ee3ng nhanh h\u01a1n<\/strong><\/li>\n\n\n\n<li>Kh\u00f3 qu\u1ea3n l\u00fd media<\/li>\n\n\n\n<li>G\u00e2y <strong>n\u1eb7ng hosting<\/strong>, ch\u1ea1m gi\u1edbi h\u1ea1n inode<\/li>\n\n\n\n<li>T\u0103ng th\u1eddi gian backup<\/li>\n\n\n\n<li>Sinh ra h\u00e0ng lo\u1ea1t k\u00edch th\u01b0\u1edbc m\u00e0 b\u1ea1n kh\u00f4ng bao gi\u1edd d\u00f9ng \u0111\u1ebfn<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">V\u00ec v\u1eady, b\u00e0i vi\u1ebft n\u00e0y s\u1ebd h\u01b0\u1edbng d\u1eabn b\u1ea1n <strong>c\u00e1ch t\u1eaft ho\u00e0n to\u00e0n vi\u1ec7c WordPress t\u1ef1 t\u1ea1o thumbnail<\/strong>, gi\u00fap t\u1ed1i \u01b0u dung l\u01b0\u1ee3ng v\u00e0 gi\u1eef h\u1ec7 th\u1ed1ng g\u1ecdn g\u00e0ng h\u01a1n.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Vi_sao_WordPress_tao_nhieu_thumbnail_tu_dong\"><\/span>V\u00ec sao WordPress t\u1ea1o nhi\u1ec1u thumbnail t\u1ef1 \u0111\u1ed9ng?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Khi b\u1ea1n upload m\u1ed9t \u1ea3nh, WordPress m\u1eb7c \u0111\u1ecbnh t\u1ea1o ra c\u00e1c size:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>thumbnail<\/strong> \u2013 150\u00d7150<\/li>\n\n\n\n<li><strong>medium<\/strong> \u2013 300\u00d7300<\/li>\n\n\n\n<li><strong>medium_large<\/strong> \u2013 768px<\/li>\n\n\n\n<li><strong>large<\/strong> \u2013 1024px<\/li>\n\n\n\n<li><strong>1536&#215;1536<\/strong> (WP 5.3+)<\/li>\n\n\n\n<li><strong>2048&#215;2048<\/strong> (WP 5.3+)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Ngo\u00e0i ra, <strong>theme<\/strong> ho\u1eb7c <strong>plugin<\/strong>, \u0111\u1eb7c bi\u1ec7t l\u00e0 WooCommerce, c\u00f2n t\u1ef1 \u0111\u0103ng k\u00fd th\u00eam nhi\u1ec1u size kh\u00e1c nh\u01b0:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>shop_thumbnail<\/code><\/li>\n\n\n\n<li><code>shop_catalog<\/code><\/li>\n\n\n\n<li><code>shop_single<\/code><\/li>\n\n\n\n<li>size \u1ea3nh banner, icon, blog c\u1ee7a theme<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">K\u1ebft qu\u1ea3: M\u1ed9t \u1ea3nh 200 KB c\u00f3 th\u1ec3 sinh ra <em>th\u00eam 1\u20132MB \u1ea3nh ph\u1ee5<\/em>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Loi_ich_khi_tat_sinh_thumbnail_tu_dong\"><\/span>L\u1ee3i \u00edch khi t\u1eaft sinh thumbnail t\u1ef1 \u0111\u1ed9ng<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Gi\u1ea3m <strong>60\u201390%<\/strong> s\u1ed1 l\u01b0\u1ee3ng file trong th\u01b0 m\u1ee5c uploads<\/li>\n\n\n\n<li>Ti\u1ebft ki\u1ec7m dung l\u01b0\u1ee3ng hosting<\/li>\n\n\n\n<li>T\u1ed1i \u01b0u s\u1ed1 l\u01b0\u1ee3ng inode<\/li>\n\n\n\n<li>T\u0103ng t\u1ed1c \u0111\u1ed9 backup &amp; restore<\/li>\n\n\n\n<li>Qu\u1ea3n l\u00fd th\u01b0 vi\u1ec7n media d\u1ec5 d\u00e0ng h\u01a1n<\/li>\n\n\n\n<li>Gi\u1ea3m t\u00ecnh tr\u1ea1ng hosting full do \u1ea3nh<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u1eb7c bi\u1ec7t th\u00edch h\u1ee3p cho:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Web tin t\u1ee9c\/blog<\/li>\n\n\n\n<li>Web chia s\u1ebb \u1ea3nh, wallpaper<\/li>\n\n\n\n<li>Web review s\u1ea3n ph\u1ea9m<\/li>\n\n\n\n<li>Web du l\u1ecbch, \u1ea9m th\u1ef1c<\/li>\n\n\n\n<li>Website sao ch\u00e9p b\u00e0i t\u1ef1 \u0111\u1ed9ng (auto-post)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Cach_tat_tu_dong_tao_thumbnail_trong_WordPress\"><\/span>C\u00e1ch t\u1eaft t\u1ef1 \u0111\u1ed9ng t\u1ea1o thumbnail trong WordPress<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">(Ch\u1ec9 c\u1ea7n th\u00eam v\u00e0o <strong>functions.php c\u1ee7a Child Theme<\/strong>)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">D\u01b0\u1edbi \u0111\u00e2y l\u00e0 \u0111o\u1ea1n code \u0111\u1ea7y \u0111\u1ee7, t\u1eaft t\u1ea5t c\u1ea3 k\u00edch th\u01b0\u1edbc \u1ea3nh WordPress t\u1ef1 sinh + xo\u00e1 size c\u1ee7a theme plugin:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ T\u1eaft size \u1ea3nh m\u1eb7c \u0111\u1ecbnh WordPress t\u1ea1o\nfunction mt247_remove_default_image_sizes( $sizes ) {\n    unset( $sizes['thumbnail'] );    \/\/ 150x150\n    unset( $sizes['medium'] );       \/\/ 300x300\n    unset( $sizes['medium_large'] ); \/\/ 768px\n    unset( $sizes['large'] );        \/\/ 1024px\n    unset( $sizes['1536x1536'] );    \/\/ WP 5.3+\n    unset( $sizes['2048x2048'] );    \/\/ WP 5.3+\n    return $sizes;\n}\nadd_filter( 'intermediate_image_sizes_advanced', 'mt247_remove_default_image_sizes' );\n\n\/\/ T\u1eaft c\u00e1c size th\u00eam b\u1edfi theme v\u00e0 plugin\nfunction mt247_disable_additional_image_sizes() {\n    remove_image_size( 'shop_thumbnail' );\n    remove_image_size( 'shop_catalog' );\n    remove_image_size( 'shop_single' );\n}\nadd_action( 'init', 'mt247_disable_additional_image_sizes' );\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Luu_y_khi_su_dung\"><\/span>L\u01b0u \u00fd khi s\u1eed d\u1ee5ng<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Neu_theme_cua_ban_dung_thumbnail_cho_layout\"><\/span>N\u1ebfu theme c\u1ee7a b\u1ea1n d\u00f9ng thumbnail cho layout<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">V\u00ed d\u1ee5:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>danh s\u00e1ch b\u00e0i vi\u1ebft d\u1ea1ng l\u01b0\u1edbi<\/li>\n\n\n\n<li>slider h\u00ecnh \u1ea3nh<\/li>\n\n\n\n<li>layout blog\/trending<\/li>\n\n\n\n<li>shop s\u1ea3n ph\u1ea9m WooCommerce<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u2192 N\u1ebfu t\u1eaft h\u1ebft size, theme c\u00f3 th\u1ec3 hi\u1ec3n th\u1ecb \u1ea3nh kh\u00f4ng \u0111\u00fang t\u1ec9 l\u1ec7 ho\u1eb7c b\u1ecb v\u1ee1 b\u1ed1 c\u1ee5c.<br>B\u1ea1n n\u00ean test tr\u01b0\u1edbc tr\u00ean staging.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Co_the_chon_tat_mot_so_size\"><\/span>C\u00f3 th\u1ec3 ch\u1ecdn t\u1eaft m\u1ed9t s\u1ed1 size<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">V\u00ed d\u1ee5 ch\u1ec9 gi\u1eef l\u1ea1i size <strong>medium<\/strong> cho blog:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">unset( $sizes['thumbnail'] );\nunset( $sizes['large'] );\nunset( $sizes['1536x1536'] );\nunset( $sizes['2048x2048'] );<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Tat_sinh_anh_khong_xoa_anh_cu\"><\/span>T\u1eaft sinh \u1ea3nh <strong>kh\u00f4ng xo\u00e1 \u1ea3nh c\u0169<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">C\u00e1c \u1ea3nh \u0111\u00e3 t\u1ea1o tr\u01b0\u1edbc \u0111\u00f3 <strong>v\u1eabn c\u00f2n<\/strong> trong th\u01b0 m\u1ee5c uploads.<br>N\u1ebfu mu\u1ed1n d\u1ecdn s\u1ea1ch \u2192 d\u00f9ng plugin:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Media Cleaner<\/li>\n\n\n\n<li>Force Regenerate Thumbnails<\/li>\n\n\n\n<li>Remove Unused Media<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Khi_nao_nen_bat_lai_tinh_nang_sinh_thumbnail\"><\/span>Khi n\u00e0o n\u00ean b\u1eadt l\u1ea1i t\u00ednh n\u0103ng sinh thumbnail?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu website d\u00f9ng theme chuy\u00ean nghi\u1ec7p nh\u01b0 <strong>Flatsome, Newspaper, Astra, GeneratePress<\/strong>, th\u00ec vi\u1ec7c c\u00f3 c\u00e1c thumbnail chu\u1ea9n size gi\u00fap:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>T\u1ea3i \u1ea3nh nhanh h\u01a1n (\u0111\u00fang k\u00edch th\u01b0\u1edbc)<\/li>\n\n\n\n<li>Gi\u1ea3m t\u1ea3i server (kh\u00f4ng ph\u1ea3i resize \u1ea3nh online)<\/li>\n\n\n\n<li>Layout \u0111\u1eb9p, c\u00e2n \u0111\u1ed1i<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Trong tr\u01b0\u1eddng h\u1ee3p n\u00e0y b\u1ea1n <strong>n\u00ean gi\u1eef l\u1ea1i m\u1ed9t s\u1ed1 size quan tr\u1ecdng<\/strong> theo khuy\u1ebfn ngh\u1ecb c\u1ee7a theme.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Ket_luan\"><\/span>K\u1ebft lu\u1eadn<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Vi\u1ec7c WordPress t\u1ef1 sinh ra nhi\u1ec1u k\u00edch th\u01b0\u1edbc \u1ea3nh l\u00e0 c\u1ea7n thi\u1ebft cho t\u1ed1i \u01b0u t\u1ed1c \u0111\u1ed9, nh\u01b0ng kh\u00f4ng ph\u1ea3i website n\u00e0o c\u0169ng c\u1ea7n d\u00f9ng.<br>N\u1ebfu b\u1ea1n mu\u1ed1n ti\u1ebft ki\u1ec7m dung l\u01b0\u1ee3ng hosting v\u00e0 gi\u1eef media g\u1ecdn nh\u1eb9, vi\u1ec7c <strong>t\u1eaft t\u1ef1 \u0111\u1ed9ng t\u1ea1o thumbnail<\/strong> l\u00e0 gi\u1ea3i ph\u00e1p t\u1ed1i \u01b0u.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">B\u1ea1n ch\u1ec9 c\u1ea7n th\u00eam \u0111o\u1ea1n code tr\u00ean v\u00e0o <strong>functions.php c\u1ee7a Child Theme<\/strong> \u2192 sau \u0111\u00f3 upload \u1ea3nh m\u1edbi v\u00e0 t\u1eadn h\u01b0\u1edfng s\u1ef1 g\u1ecdn nh\u1eb9.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>N\u1ebfu b\u1ea1n d\u00f9ng WordPress l\u00e2u n\u0103m, ch\u1eafc ch\u1eafn t\u1eebng g\u1eb7p tr\u01b0\u1eddng h\u1ee3p: ch\u1ec9 t\u1ea3i l\u00ean 1 t\u1ea5m \u1ea3nh nh\u01b0ng hosting l\u1ea1i xu\u1ea5t hi\u1ec7n 5\u201310 file \u1ea3nh kh\u00e1c nhau. \u0110\u00fang r\u1ed3i, \u0111\u00f3 ch\u00ednh l\u00e0 c\u01a1 ch\u1ebf WordPress t\u1ef1 \u0111\u1ed9ng t\u1ea1o thumbnail v\u00e0 nhi\u1ec1u k\u00edch th\u01b0\u1edbc \u1ea3nh, nh\u1eb1m t\u1ed1i \u01b0u hi\u1ec3n th\u1ecb cho theme. Tuy nhi\u00ean, v\u1edbi [&#8230;]\n","protected":false},"author":1,"featured_media":262,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_focus_keyword":"","rank_math_description":"","rank_math_title":"","footnotes":""},"categories":[11,20],"tags":[],"class_list":["post-247","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","category-thu-thuat"],"acf":[],"_links":{"self":[{"href":"https:\/\/muatheme247.com\/en\/wp-json\/wp\/v2\/posts\/247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/muatheme247.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/muatheme247.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/muatheme247.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/muatheme247.com\/en\/wp-json\/wp\/v2\/comments?post=247"}],"version-history":[{"count":1,"href":"https:\/\/muatheme247.com\/en\/wp-json\/wp\/v2\/posts\/247\/revisions"}],"predecessor-version":[{"id":248,"href":"https:\/\/muatheme247.com\/en\/wp-json\/wp\/v2\/posts\/247\/revisions\/248"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/muatheme247.com\/en\/wp-json\/wp\/v2\/media\/262"}],"wp:attachment":[{"href":"https:\/\/muatheme247.com\/en\/wp-json\/wp\/v2\/media?parent=247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/muatheme247.com\/en\/wp-json\/wp\/v2\/categories?post=247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/muatheme247.com\/en\/wp-json\/wp\/v2\/tags?post=247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}