Changes between Version 1 and Version 2 of Ticket #51780, comment 22
- Timestamp:
- 02/24/2023 12:22:59 AM (19 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #51780, comment 22
v1 v2 1 Not sure this is a good addition to `get_attached_file()`. This function should **get the attached file**, i.e. a PDF, a video, a n image, etc. What is the point to extend it only for images? That seems confusing:(1 Not sure this is a good addition to `get_attached_file()`. This function should **get the attached file**, i.e. a PDF, a video, a document, etc. This function is not intended only for images, what is the point to extend it only for image sub-sizes? That seems confusing and contrary to the initial design decision :( 2 2 3 3 Also, looking at the description, there is no reason why this is needed. If there is really a good reason for such function, it should probably be a new function. 4 4 5 However I don't see a reason why plugin authors cannot use `image_get_intermediate_size()` for this. That 's probably currently used anyways.5 However I don't see a reason why plugin authors cannot use `image_get_intermediate_size()` for this. That is probably currently being used. Getting the path to an image sub-size seems like something that's rarely needed anyway. 6 6 7 7 Another serious objection here is that this patch slows down `get_attached_file()` as it always does another DB request looking for image meta, no matter what file is attached.