Mobile Featured Image Bug

The images not being loaded are prefixed with the domain https://i2.wp.com This is the CDN used when you activate the PHOTON module in the Jetpack Plugin. If you deactivate the PHOTON module or deactivate the Jetpack Plugin, you should be rid of the issue.

Watermark images only for some users

I figured out a sort of working solution, by using the plugin Image Watermark by dfactory. The plugin has an option to back up all uploads, and by checking that in settings it uploads all your photos twice, with a backup in /wp-content/uploads/iw-backup/. What I did was enabling watermarking for all versions of the uploaded … Read more

Any specific reason why images do not show on site?

It seems to me that the URL is wrong for the images (HREF). Most like you are modifing or adding content to the site directly from the server while accessing it from http://localhost/. Based on your screenshot, the error message you’re getting on the workstation refers to “localhost/wordpress/content/uploads….” where localhost is the server, BUT in … Read more

Adding different backgrounds for different pages

It would be helpful if you’ve said your CSS selector is whether not working or it’s working but the image just doesn’t appear. You also didn’t clarify if your image should appear literally behind the entire page (header, content and footer) or just behind the content. Anyway, Enfold adds a background-color property to almost every … Read more

Random Size on Featured Image

You can put the sizes into an array and use PHP’s array_rand to choose a random size: $sizes = array( ‘small’, ‘medium’, ‘large’ ); foreach( $pages as $page ){ $random_size = array_rand( $sizes, 1 ); echo get_the_post_thumbnail( $page->ID, $sizes[$random_size] ); }

Generating different dimension images while uploading image file from custom plugin page

Resized different dimension image sets are generated by using wp_generate_attachment_metadata and wp_update_attachment_metadata method. $absFilename = $wp_upload_dir[‘path’].”https://wordpress.stackexchange.com/”.$filename; $attach_data = wp_generate_attachment_metadata( $attach_id, $absFilename); wp_update_attachment_metadata( $attach_id, $attach_data ); This will update the image details in the wp_postmeta table. Thanks @DaveRomsey

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)