Skip to main content
added 6 characters in body; edited title
Source Link
Tom J Nowell
  • 60.6k
  • 7
  • 77
  • 147

Restrict Image Sizes and Dimensions when Uploading via REST API (WPthe WP Mobile App)

I restrict image uploads by file size and dimensions on my client's websites using 'wp_handle_upload_prefilter'. However, it appears this function is not called when using the Wordpress.com mobile app.

However, it appears this function is not called when using the WordPress.com mobile app. Authors who use this mobile app method for posting are allowed to upload any size and dimensions via the media library and "featured image" sections.

I assume the mobile app uses the REST API, rather than conventional frontend code. I haven't been able to find any filters for uploads using the REST API. Does anyone know of a workaround?

I understand there are methods of reducing overall file upload sizes across WordPress. This is not a question for the 'upload_size_limit' filter. I restrict both file size and image height/width for images. I also implement a different file size restriction for audio files, etc. I've exhausted research in finding a way to stop my authors from circumventing these restrictions using the WP app, which I assume uses REST. I do not want to prohibit them from using it though.

Oh, I should mention. We are NOT hosted on wp.com. We are using the app to login to our hosted website.

Restrict Image Sizes and Dimensions when Uploading via REST API (WP Mobile App)

I restrict image uploads by file size and dimensions on my client's websites using 'wp_handle_upload_prefilter'. However, it appears this function is not called when using the Wordpress.com mobile app. Authors who use this mobile app method for posting are allowed to upload any size and dimensions via the media library and "featured image" sections.

I assume the mobile app uses the REST API, rather than conventional frontend code. I haven't been able to find any filters for uploads using the REST API. Does anyone know of a workaround?

I understand there are methods of reducing overall file upload sizes across WordPress. This is not a question for the 'upload_size_limit' filter. I restrict both file size and image height/width for images. I also implement a different file size restriction for audio files, etc. I've exhausted research in finding a way to stop my authors from circumventing these restrictions using the WP app, which I assume uses REST. I do not want to prohibit them from using it though.

Oh, I should mention. We are NOT hosted on wp.com. We are using the app to login to our hosted website.

Restrict Image Sizes and Dimensions when Uploading via the WP Mobile App

I restrict image uploads by file size and dimensions on my client's websites using 'wp_handle_upload_prefilter'.

However, it appears this function is not called when using the WordPress.com mobile app. Authors who use this mobile app method for posting are allowed to upload any size and dimensions via the media library and "featured image" sections.

I assume the mobile app uses the REST API, rather than conventional frontend code. I haven't been able to find any filters for uploads using the REST API. Does anyone know of a workaround?

I understand there are methods of reducing overall file upload sizes across WordPress. This is not a question for the 'upload_size_limit' filter. I restrict both file size and image height/width for images. I also implement a different file size restriction for audio files, etc. I've exhausted research in finding a way to stop my authors from circumventing these restrictions using the WP app, which I assume uses REST. I do not want to prohibit them from using it though.

Oh, I should mention. We are NOT hosted on wp.com. We are using the app to login to our hosted website.

added 113 characters in body
Source Link

I restrict image uploads by file size and dimensions on my client's websites using 'wp_handle_upload_prefilter'. However, it appears this function is not called when using the Wordpress.com mobile app. Authors who use this mobile app method for posting are allowed to upload any size and dimensions via the media library and "featured image" sections.

I assume the mobile app uses the REST API, rather than conventional frontend code. I haven't been able to find any filters for uploads using the REST API. Does anyone know of a workaround?

I understand there are methods of reducing overall file upload sizes across WordPress. This is not a question for the 'upload_size_limit' filter. I restrict both file size and image height/width for images. I also implement a different file size restriction for audio files, etc. I've exhausted research in finding a way to stop my authors from circumventing these restrictions using the WP app, which I assume uses REST. I do not want to prohibit them from using it though.

Oh, I should mention. We are NOT hosted on wp.com. We are using the app to login to our hosted website.

I restrict image uploads by file size and dimensions on my client's websites using 'wp_handle_upload_prefilter'. However, it appears this function is not called when using the Wordpress.com mobile app. Authors who use this mobile app method for posting are allowed to upload any size and dimensions via the media library and "featured image" sections.

I assume the mobile app uses the REST API, rather than conventional frontend code. I haven't been able to find any filters for uploads using the REST API. Does anyone know of a workaround?

I understand there are methods of reducing overall file upload sizes across WordPress. This is not a question for the 'upload_size_limit' filter. I restrict both file size and image height/width for images. I also implement a different file size restriction for audio files, etc. I've exhausted research in finding a way to stop my authors from circumventing these restrictions using the WP app, which I assume uses REST. I do not want to prohibit them from using it though.

I restrict image uploads by file size and dimensions on my client's websites using 'wp_handle_upload_prefilter'. However, it appears this function is not called when using the Wordpress.com mobile app. Authors who use this mobile app method for posting are allowed to upload any size and dimensions via the media library and "featured image" sections.

I assume the mobile app uses the REST API, rather than conventional frontend code. I haven't been able to find any filters for uploads using the REST API. Does anyone know of a workaround?

I understand there are methods of reducing overall file upload sizes across WordPress. This is not a question for the 'upload_size_limit' filter. I restrict both file size and image height/width for images. I also implement a different file size restriction for audio files, etc. I've exhausted research in finding a way to stop my authors from circumventing these restrictions using the WP app, which I assume uses REST. I do not want to prohibit them from using it though.

Oh, I should mention. We are NOT hosted on wp.com. We are using the app to login to our hosted website.

Source Link

Restrict Image Sizes and Dimensions when Uploading via REST API (WP Mobile App)

I restrict image uploads by file size and dimensions on my client's websites using 'wp_handle_upload_prefilter'. However, it appears this function is not called when using the Wordpress.com mobile app. Authors who use this mobile app method for posting are allowed to upload any size and dimensions via the media library and "featured image" sections.

I assume the mobile app uses the REST API, rather than conventional frontend code. I haven't been able to find any filters for uploads using the REST API. Does anyone know of a workaround?

I understand there are methods of reducing overall file upload sizes across WordPress. This is not a question for the 'upload_size_limit' filter. I restrict both file size and image height/width for images. I also implement a different file size restriction for audio files, etc. I've exhausted research in finding a way to stop my authors from circumventing these restrictions using the WP app, which I assume uses REST. I do not want to prohibit them from using it though.