# Hook Function resizeResource

**URL:** <https://forums.realmacsoftware.com/t/hook-function-resizeresource/46386>\
**Category:** RapidWeaver Elements\
**Created:** [February 21, 2025, 12:42pm UTC](https://forums.realmacsoftware.com/t/hook-function-resizeresource/46386 "2025-02-21T12:42:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Beblebroks](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@Beblebroks](https://forums.realmacsoftware.com/u/Beblebroks)\
**Post date:** [February 21, 2025, 12:42pm UTC](https://forums.realmacsoftware.com/t/hook-function-resizeresource/46386/1 "2025-02-21T12:42:02Z")

</div>

Hi

for the function `rw.resizeResource` in the hooks. Do you plan to have 2 parameters for the width AND the height? Could be contained when transforming.

Would be cool to autogenerate square thumbnails.

---

<div class="post-metadata">

**Author:** ![tpbradley](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/tpbradley/32/25503_2.png) [@tpbradley](https://forums.realmacsoftware.com/u/tpbradley)\
**Post date:** [February 21, 2025, 2:19pm UTC](https://forums.realmacsoftware.com/t/hook-function-resizeresource/46386/2 "2025-02-21T14:19:20Z")

</div>

Hey @Beblebroks

We don’t currently have plans for this as it’s better to crop using an image editor where you have better control. However, you can easily use css to present a rectangular image as a square thumbnail.

Is there a particular use case you have in mind?

---

<div class="post-metadata">

**Author:** ![Beblebroks](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@Beblebroks](https://forums.realmacsoftware.com/u/Beblebroks)\
**Post date:** [February 21, 2025, 2:23pm UTC](https://forums.realmacsoftware.com/t/hook-function-resizeresource/46386/3 "2025-02-21T14:23:44Z")

</div>

Use case would just be to have them squared. And as I meant I would keep it simple. No options just a “contain” on what ever size you specify.

And it would mean you would have all correct sizes available. You would save as well a bit on bandwith if the images are always the correct size.

In general I agree with the sizing in an editor, but I am thinking about users who just throw in huge images. And then it would be handy for “DevPacks”

Yeah just some thoughts. From my side I know how to work around it. 😃

Thanks for the feedback.

---

<div class="post-metadata">

**Author:** ![tpbradley](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/tpbradley/32/25503_2.png) [@tpbradley](https://forums.realmacsoftware.com/u/tpbradley)\
**Post date:** [February 21, 2025, 2:50pm UTC](https://forums.realmacsoftware.com/t/hook-function-resizeresource/46386/4 "2025-02-21T14:50:26Z")

</div>

Yep ok, I’ll pop it on the list 👍

---

<div class="post-metadata">

**Author:** ![Beblebroks](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@Beblebroks](https://forums.realmacsoftware.com/u/Beblebroks)\
**Post date:** [February 22, 2025, 9:21am UTC](https://forums.realmacsoftware.com/t/hook-function-resizeresource/46386/5 "2025-02-22T09:21:25Z")

</div>

Hi @tpbradley,

below settings would work to achieve what I wanted with a normal Image component. Won’t help with thumbnail size and DevPacks. But the look is the same that I try to achieve:

 ![CleanShot 2025-02-22 at 17.18.19@2x](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/e/5/e59ee578b375169aaec417be0449be3245801f00.png)
