(Divi): How to make WordPress load images of specific size for Blurb modules on given page with a funciton?

Elegant Themes (Divi) recommend a maximum width of 550px for blurb images (https://www.elegantthemes.com/blog/divi-resources/the-ultimate-guide-to-using-images-within-divi). So you should be resizing your images according to those guidelines for the images that you know will be used in your blurbs. This will ensure that your images don’t cause WordPress too much memory effort to resize them on the fly, … Read more

I can’t load my images from a js file using wp_localize_script

You’re not accessing the value correctly. The 2nd argument of wp_localize_script is the name of a JavaScript object that your data will be added to. In your case it’s wpa_data. This means that the image_path is accessed at wpa_data.image_path: $(function(){ jQuery(document).ready(function() { $(‘#home’).backstretch([ wpa_data.image_path+”home-bg-slideshow1.jpg”, wpa_data.image_path+”home-bg-slideshow2.jpg”, wpa_data.image_path+”home-bg-slideshow3.jpg”, ], {duration: 2000, fade: 750}); }); })

Images 404 after wp migration to a subdomain

Image URLs are stored within the ‘post’ entry that is the media item. So you can change each one manually via the Media screen. Or use a search/replace plugin to do it all at once. I like the “Better Search and Replace” plugin. Just enter the old URL’s domain, and the new one. Use the … Read more