Articles of images

Optimising uploads folder then re-uploading?

Rather than using a plugin to optimise images via the admin, would downloading and optimising locally work as well? As in would downloading the uploads folder, using something like ImageOptim to optimise all the images then re-uploading them work? Or for the site to take advanced of an optimised image does it need to be […]

JointWP – Can't add custom images sizes

I am trying to add a custom image size in the functions.php file. add_image_size( ‘Portrait’, 1200, 1800, false ); add_image_size( ‘Featured’, 2560, 1600, true ); This is the newest version with foundation 6. Am I putting it in the wrong file? Thanks for any help.

after migration, newly uploaded images won't show up

I created a subdomain e.g dev.example.com where I uploaded a bunch of images and I did most of my dev. I moved the WordPress install following the Codex instructions Moving WordPress > Moving directories on your existing server Surprisingly, all my images were still there (no broken links) Now, when I upload new images from […]

Images Uploaded saving onto older/previous year folders

Recently, I have noticed this scenario, where my images uploading to media library, saving on to older years, months not the current year. Is it possible to make image uploading to current, I am not uploading images inside any post/pages, I am directly uploading to media library. Please help me, it cant be an issue, […]

Remove Additional image sizes created by theme

I am using this code to remove additional image sizes created by theme which seems to work but I can still see 1 more size being generated when i upload an image. Is there anything wrong with my code? add_action(‘init’, ‘remove_plugin_image_sizes’); function remove_plugin_image_sizes() { remove_image_size(‘post-thumbnail’); remove_image_size(‘entry’); remove_image_size(‘entry-cropped’); remove_image_size(‘entry-fullwidth’); remove_image_size(‘entry-cropped-fullwidth’); }

Customizer image control default value showing in customizer but not on frontend

I use the WP_Customize_Image_Control to add the image. But, The default value is accessible in Customizer only!!! On front-end It return empty. How to reproduce? Copy below code snippet and paste in your themes functions.php. Visit URL http://YOUR_SITE/wp-admin/customize.php?autofocus[section]=section-test_option to open section Test Section add_action( ‘customize_register’, ‘test_1234_customize_register’ ); add_action( ‘wp_head’, ‘test_1234_customizer_ouput_debug’ ); function test_1234_customizer_ouput_debug() { // […]

Get all custom sizes in srcset attribute

I have three custom sizes: add_image_size( ‘img-movil’, 667, 667, true ); add_image_size( ‘c200x200’, 200, 200, true ); add_image_size( ‘c400x400′, 400, 400, true ); And I’m tring to get them into the srcset: $img_srcset = wp_get_attachment_image_srcset( $img_id, array( ‘c200x200’, ‘c400x400’, ‘img-movil’ ) ); srcset=”<?php echo esc_attr( $img_srcset ); ?> But I get this into the srcset: […]

remove enclosure url from feed

I searched the whole internet, including this website, but there is no written way on how to remove the enclosure url from the WordPress feed. I want to remove it because FeedBurner is adding the image url directly in the email that it is sending to subscribers. The reason doesn’t really matter I guess, so […]

Speed Up Website With High Resolution Images

i need help on how to speed up my WordPress website with very high resolution images. The thing is, i have W3 Total Cache installed, and i’ve enabled all cache options, also i have the images resized and reduced to about 130kilobyte each, maintaining the resolutions, but the site is still slow. When i checked, […]

Theme logo metadata into template file

I’m looking to pull all of the metadata (e.g. alt, width, height) from the theme logo, which is uploaded through Appearance -> Customization into my theme template file. This is what I currently have, but it’s not working: $custom_logo_id = get_theme_mod(‘custom_logo’); if ($custom_logo_id) { $image = wp_get_attachment_image_src($custom_logo_id, ‘full’); $meta = wp_get_attachment_metadata($custom_logo_id); echo ‘<img src=”‘ . […]