Replies: 2 comments 1 reply
-
i support this. image generation should be separate from the application logic and state. frames will get heavier and heavier with more utility. |
Beta Was this translation helpful? Give feedback.
-
Just to add, currently, unlike the frame handler, the image handler does not accept strings i.e external urls. I think you can't really "remove" the image handler from |
Beta Was this translation helpful? Give feedback.
-
Here's the deal.
App clients (such as warpcast) fetch a frame in a two-step process:
For a long time, images have been defined in the
c.res
ofapp.frame(...)
handler (a.k.a inFrameResponse
).It made it easy to work with as images were generated in the same place where the business logic for the actual frame resided, and it served a good purpose for the time being when frames have not been heavily loaded with UI elements.
The way it works is that image is being compressed and placed in the query parameter.
Now, with time, frames became more UI-heavy and FrogUI was one of the reasons to add more "weight" to the image.
On top of that, it was not possible to create "refreshing" initial frames at all.
It made the compressed image string so long that now it doesn't fit in the actual limits, leading to the "Image failed to load" issues.
We've added Image Handler as a way to mitigate that.
Proposal
I propose to deprecate defining an image in
.frame
handler and have developers to always explicitly define a separate.image
handler.With #419 implemented, it should not be a huge hassle to do that.
6 votes ·
Beta Was this translation helpful? Give feedback.
All reactions