Support

Account

Home Forums General Issues Fallback image size when using wp_get_attachment_image_src Reply To: Fallback image size when using wp_get_attachment_image_src

  • Hi @lechatlisse

    If the ‘large’ size doesn’t exist, then the uploaded image must be smaller than ‘large’. Therefore, the image returned (full size) will not be a “very large filesize unnecessarily”.

    This aside, why not use image fiedl setting of ‘image object’ for the return type.
    This way, you can look in the ‘sizes’ array at all the URLs and sizes to make sure you get the correct fallback data.

    Thanks
    E