{"id":9776,"date":"2020-02-17T15:39:10","date_gmt":"2020-02-17T15:39:10","guid":{"rendered":"http:\/\/themenectar.com\/docs\/salient\/?page_id=9776"},"modified":"2020-02-17T15:53:02","modified_gmt":"2020-02-17T15:53:02","slug":"modify-image-sizes","status":"publish","type":"page","link":"https:\/\/themenectar.com\/docs\/salient\/modify-image-sizes\/","title":{"rendered":"Modify image sizes"},"content":{"rendered":"\n
Removing an image size can be handled through the child theme functions.php file.<\/p>\n\n\n\n
\n\nadd_action( 'after_setup_theme', 'salient_child_remove_image_sizes', 11 );\n\nfunction salient_child_remove_image_sizes() {\n\t\n\t\/* PORTFOLIO & IMAGE GRID SPECIFIC STYLES *\/\n \/\/ remove_image_size( 'portfolio-widget' ); \n\t\/\/ remove_image_size( 'portfolio-thumb_small' ); \n\t\/\/ remove_image_size( 'portfolio-thumb_large' );\n\t\/\/ remove_image_size( 'regular_small' ); \n\t\/\/ remove_image_size( 'regular' ); \n\t\/\/ remove_image_size( 'wide_small' ); \n\t\/\/ remove_image_size( 'wide' ); \n\t\/\/ remove_image_size( 'tall' );\n\t\/\/ remove_image_size( 'wide_tall' );\n\t\/\/ remove_image_size( 'wide_photography' ); \n\t\n\t\n \/* GENERAL SIZES *\/\n \/\/ remove_image_size( 'large_featured' ); \n \/\/ remove_image_size( 'medium_featured' ); \n}\n\n<\/pre><\/div>\n\n\n<\/div>\n\n\n\nAltering image sizes<\/h3>\n\n\n\n
Altering a Salient image size can be accomplished by first removing the existing image size and then registering the new size. Note that after the altered sizes have been registered, you will need to run the Regenerate Thumbnails<\/a> plugin to recreate all of your existing images on the server in the new size. <\/p>\n\n\n
\n\n\/\/ Alter image sizes \nadd_action( 'after_setup_theme', 'salient_child_remove_image_sizes', 11 );\n\nfunction salient_child_remove_image_sizes() {\n\t\n\tremove_image_size( 'regular' ); \n\tadd_image_size( 'regular', 800, 400, true ); \n\t \n}\n\n<\/pre><\/div>\n\n\n<\/div>\n","protected":false},"excerpt":{"rendered":"Removing Image Sizes Removing an image size can be handled through the child theme functions.php file. Step 1: Open your child theme functions.php (salient-child\/functions.php) Step 2: Copy the below snippet into the…<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/themenectar.com\/docs\/salient\/wp-json\/wp\/v2\/pages\/9776"}],"collection":[{"href":"https:\/\/themenectar.com\/docs\/salient\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/themenectar.com\/docs\/salient\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/themenectar.com\/docs\/salient\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/themenectar.com\/docs\/salient\/wp-json\/wp\/v2\/comments?post=9776"}],"version-history":[{"count":0,"href":"https:\/\/themenectar.com\/docs\/salient\/wp-json\/wp\/v2\/pages\/9776\/revisions"}],"wp:attachment":[{"href":"https:\/\/themenectar.com\/docs\/salient\/wp-json\/wp\/v2\/media?parent=9776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}