more info on image size calculations and class definitions
-
I am looking at what WP does to images that are being uploaded and I see that after uploading only one image it creates 3 of them:
<div class="wp-block-image"> <figure class="alignleft size-large is-resized"><img src="https://www.x.com/wp/wp-content/uploads/2020/05/y-1.jpg" alt="" class="wp-image-18233" width="499" height="299" srcset="https://www.x.com/wp/wp-content/uploads/2020/05/y-1.jpg 555w, https://www.x.com/wp/wp-content/uploads/2020/05/y-1-300x179.jpg 300w, https://www.x.com/wp/wp-content/uploads/2020/05/y-1-150x90.jpg 150w" sizes="(max-width: 499px) 100vw, 499px" /></figure></div>
I have two questions:
1. how are these new dimensions decided? are 555, 300 and 150 standard widths? Is there a golden rule?
2. Where does the class “wp_image-18233” come from? what is the number 18233? it’s not the ID of the post…Thank you
- The topic ‘more info on image size calculations and class definitions’ is closed to new replies.