I’m trying to add a new image size of 300×300..
This works, but if the uploaded file is for example 300×300, it doesn’t upload the resized image.. You’d say that isn’t a problem because the original is the resolution I need, but I get the image later on with:
wp_get_attachment_image_src( $meta['background'][0], array(300,300) );
And if this image is not there, wordpress fetches another size, which of course is not what I want..
What should I do?
I have added an image size
Uploaded an image of exactly 300 x 300px,
Then got the image
Works both ways. Maybe you did not define the image size correctly in functions.php