• Resolved boopathid

    (@boopathid)


    Hi,

    big_image_size_threshold is a very good feature. can some tell me how to use it for front-end/clients, when client uploading above 2560px it throws error post processing. for this how to use this feature in front-end, if someone upload the media above 2560px it can be auto scaled. So there is no problem.

    Another doubt this feature works for .png,.jpg?

    NOTE: I am using reality theme, there for front-end media upload is extended. Any suggestion would be great

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    It’s used when WP generates the various image sizes when image files are uploaded to the media library. To use it outside of the media library, PHP code can call wp_create_image_subsizes(). In order to use this function, the full file must be already uploaded and an attachment post created for it. If other file upload restrictions are encountered (file byte size limit for example) this threshold will no help any. All the threshold really does is cause WP to treat the 2560pxs image as the “full” size even though a larger image exists.

    The threshold is not applied to .png files because the PHP image editor often ends up creating larger files (in bytes) than the original.

    Thread Starter boopathid

    (@boopathid)

    @bcworkz Thanks for the info. Much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘big_image_size_threshold for frontend / clients’ is closed to new replies.