Run function before uploaded image is saved

WordPress already compresses jpeg files, doing it a second time will just degrade the quality with recompression artefacts Instead, adjust the compression percentage via the jpeg_quality filter: add_filter( ‘jpeg_quality’, function() { return 80; // 80% });

Pasted image and text in the editor doesn’t work

You must Add your image form Add media in text editor. After that click on image in text editor and then you fill find 5 option for image editing. There you can align image and edit image. Or it best practice to upload image from wordpress standard. The upload image will save in wp-content folder.

How to see previous –next image option in the theme?

You should insert post navigation manually. Update functions.php of your theme with add_filter(‘the_content’, function($content) { return $content . get_the_post_navigation(); }); Or insert the_post_navigation() in desirable place in your single.php template. You should create child theme to be able update primary theme.

Using custom field to change alt text for a featured image

I think you gave the answer in your last comment. if (get_field(‘alt_image_f’)){ $post_thumbnail_attr = array(‘alt’ => get_field(‘alt_image_f’) ); the_post_thumbnail( ‘full’, $post_thumbnail_attr ); } else the_post_thumbnail(); Cleaning up your code a bit, the following should work $custom_image_alt = get_field(‘alt_image_f’); $post_thumbnail_attr = array(); if ($custom_image_alt) { $post_thumbnail_attr[‘alt’] = $custom_image_alt; } the_post_thumbnail(‘full’, $post_thumbnail_attr);