Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

New answers tagged

0 votes

Should I not compress my jpeg files before uploading to avoid double compression?

Re-compressing a JPEG using the exact same settings does not result in quality loss beyond the initial compression. However, if the settings used by WordPress differ from those applied by your photo ...
user avatar
  • 5,195
0 votes

Migration to WP - Couldn't load image

Due to Jacob Peattie's comment I decided to exam the HTML around rather than beating around the src-bush and it turned out that the thing was the one causing problems. Once I took the image out of it,...
user avatar
1 vote

Should I not compress my jpeg files before uploading to avoid double compression?

From looking at WordPress' sourcecode it appears to use the PHP function imagejpeg to save images. The PHP documentation doesn't mention anything about checking the quality before saving the image. ...
user avatar
0 votes

List all images from a single post meta value

Get images from Gallery Custom Post Meta <?php $meta = get_post_meta(get_the_ID(), 'gallery'); foreach ($meta as $m) : $img_atts = wp_get_attachment_image_src( $m, $default ); $...
user avatar
0 votes

Get the first image from post content (eg.: hotlinked images)

If you are trying to find an attachment post id with attachment_url_to_postid once you find an image in the content, you may not find that id if the image you found is a scaled version of the image. ...
user avatar
0 votes

Updating product image

Propably you replace only original versions of images, but wordpress create a few this same images with different sizes. After upload your photos you should regenerate thumbnails on wordpress ...
user avatar
  • 1
0 votes

My authors need to be able to preview their upload images and manipulate and scale

i believe one way to do what you want would be to simply add an action="post.php" to your form. so the form redirect user to post.php onsubmit in which you can get the user input through $...
user avatar
  • 36
0 votes
Accepted

Place image caption outside of figure tag (Gutenburg Image Markup)

I control the aspect ratio/crop of my images with padding, like this. Though, new WP blocks styles clash with this method. Resulting in captions behind or on top of the image. By looping through each ...
user avatar

Top 50 recent answers are included