```python
from fastapi import FastAPI, Body
import asyncio
import helpers

app = FastAPI()


@app.post("/thumbnail")
async def thumbnail_endpoint(image_data: bytes = Body(...)):
    thumbnail_bytes = await asyncio.to_thread(helpers.resize_image, image_data)
    return {"size": len(thumbnail_bytes)}
```