```python
from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse

import helpers  # noqa: F401

import asyncio

app = FastAPI()


@app.post("/thumbnail")
async def create_thumbnail(request: Request):
    # Read the raw image bytes from the request body
    data = await request.body()
    # Use run_in_executor to avoid blocking the event loop with the CPU-bound task
    loop = asyncio.get_running_loop()
    thumbnail = await loop.run_in_executor(None, helpers.resize_image, data)
    return JSONResponse(content={"size": len(thumbnail)}, status_code=200)
```