Making WordPress.org

Opened 2 months ago

Last modified 6 weeks ago

#7854 new enhancement

Add Javascript validation to Photo Directory submissions

Reported by: jeffpaul's profile JeffPaul Owned by:
Milestone: Priority: normal
Component: Photo Directory Keywords:
Cc:

Description

I’m getting an “Your photo must have a width and height of at least 2000 pixels each.” error post-submission on a photo that has 4032x2268 dimensions. So this would ideally be something we catch before someone submits (e.g. after browsing & selecting a photo locally) in case they have a higher res option and so they don’t lose the alt text/description provided for the photo as that’s stripped out when the page refreshes to show the error message.

Attachments (2)

IMG_8025.jpeg (3.1 MB) - added by JeffPaul 6 weeks ago.
white-stones-pic.jpg (4.1 MB) - added by JayDeep Nimavat 3 weeks ago.
I am having the same issue with this file.

Change History (4)

#1 @coffee2code
8 weeks ago

There are already client-side JS checks for file dimensions (among various other things), though admittedly that part is a bit hacky.

However, given what you've said, the image has proper dimensions? Your minimum dimension is apparently 2268, which is greater than the 2000 minimum. So the JS wouldn't see the image as having incorrect dimensions. Which suggests a server-side issue (wrong dimensions being detected, wrong error being shown, hiccup with the processing, etc).

I'll reach out and request a copy of the image to debug this.

#2 @JeffPaul
6 weeks ago

A bit more context on this issue is noted in a Slack thread, but I'm copying here the sample image that causes this problem for further triage.

@JeffPaul
6 weeks ago

@JayDeep Nimavat
3 weeks ago

I am having the same issue with this file.

Note: See TracTickets for help on using tickets.