# When setting the standard image size values to 0 in the theme settings, the values 9999 are assigned in the code

**URL:** https://forum.pinegrow.com/t/when-setting-the-standard-image-size-values-to-0-in-the-theme-settings-the-values-9999-are-assigned-in-the-code/5998
**Category:** Pinegrow Theme Converter
**Tags:** bug, feature-request
**Created:** [December 7, 2021, 3:38am UTC](https://forum.pinegrow.com/t/when-setting-the-standard-image-size-values-to-0-in-the-theme-settings-the-values-9999-are-assigned-in-the-code/5998 "2021-12-07T03:38:21Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Catative](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/catative/32/4019_2.png) [@Catative](https://forum.pinegrow.com/u/Catative)
#### Post date: [December 7, 2021, 3:38am UTC](https://forum.pinegrow.com/t/when-setting-the-standard-image-size-values-to-0-in-the-theme-settings-the-values-9999-are-assigned-in-the-code/5998/1 "2021-12-07T03:38:22Z")

</div>

Hello.

In my project, I wanted to disable the generation of standard image sizes, since for my purposes I only need my own custom sizes. I set the width and height values ​​to 0 (by analogy, described [in the article](https://quadlayers.com/remove-wordpress-default-image-sizes/) in the section “Manually via WP-Admin”), but in the program code they assigned the values ​​9999:

 ![Screenshot_20211207_102540](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/a/a9bf88c54a0867c782e9f378e915c4db51361d7e.png)

In functions.php:

 ![Screenshot_20211207_102709](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/d/d06dd5aae75d5dcd0c6f0c16e309a757126d757f.png)

**Addition** : it would also be great to see checkboxes in the Pinegrow Theme Converter interface, by clicking on which it would be possible to disable the standard image sizes in one click.

---

<div class="post-metadata">

### Author: ![Catative](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/catative/32/4019_2.png) [@Catative](https://forum.pinegrow.com/u/Catative)
#### Post date: [December 7, 2021, 3:49am UTC](https://forum.pinegrow.com/t/when-setting-the-standard-image-size-values-to-0-in-the-theme-settings-the-values-9999-are-assigned-in-the-code/5998/2 "2021-12-07T03:49:42Z")

</div>

This also leads to an error:

 ![Screenshot_20211207_104557](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/f/f87a38cc5c6379ae1ee89583e988bd9b76bfa9ca.png)

I suspect this is due to the missing semicolon in the generated code on line 51 in the `functions.php` file (see screenshot in the post above)

---

<div class="post-metadata">

### Author: ![Catative](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/catative/32/4019_2.png) [@Catative](https://forum.pinegrow.com/u/Catative)
#### Post date: [December 7, 2021, 4:02am UTC](https://forum.pinegrow.com/t/when-setting-the-standard-image-size-values-to-0-in-the-theme-settings-the-values-9999-are-assigned-in-the-code/5998/3 "2021-12-07T04:02:09Z")

</div>

If you return the height and width values ​​of the standard sizes to their default values:

 ![Screenshot_20211207_105642](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/4/4b7718cdc871dc00d4e7598e1a56e10b4f58ebf4.png)

​​and click “save” and “export theme”, the generated code will not be deleted and the error will continue to appear on my site. The problem can be solved only by manually deleting the generated code.

---

<div class="post-metadata">

### Author: ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)
#### Post date: [December 7, 2021, 11:14am UTC](https://forum.pinegrow.com/t/when-setting-the-standard-image-size-values-to-0-in-the-theme-settings-the-values-9999-are-assigned-in-the-code/5998/4 "2021-12-07T11:14:44Z")

</div>

Hi @Catative,  
Thanks, for bringing this to our attention.  
Bob

---

<div class="post-metadata">

### Author: ![Catative](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/catative/32/4019_2.png) [@Catative](https://forum.pinegrow.com/u/Catative)
#### Post date: [December 7, 2021, 11:48am UTC](https://forum.pinegrow.com/t/when-setting-the-standard-image-size-values-to-0-in-the-theme-settings-the-values-9999-are-assigned-in-the-code/5998/5 "2021-12-07T11:48:40Z")

</div>

Also, after that, if you select `Wordpress-> Regenerate functions.php ...`, then the f`unctions_backup.php` file will be created in two places: in the root directory of the project and in the \_pgexport directory:

 ![Screenshot_20211207_102546575](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/b/b57267a31972c286ada3a9f0454bdc219d93134e.png)

In this case, the `functions_backup.php` file will create the newly generated code, while the `functions.php` file will remain with my custom code.

Also, only the `functions_backup.php` file will be exported to the theme folder, `functions.php` will be replaced by the `functions_backup.php` file, which will cause errors in Wordpress:

 ![Screenshot_20211207_183359](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/f/fb5f06aa6a5da2fb116d34d8e74a7e74148500db.png)

Most likely, during the operation of re-creating `functions.php`, the names of the `functions.php` and `functions_backup.php` files are mixed up.

---

<div class="post-metadata">

### Author: ![Catative](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/catative/32/4019_2.png) [@Catative](https://forum.pinegrow.com/u/Catative)
#### Post date: [December 7, 2021, 11:59am UTC](https://forum.pinegrow.com/t/when-setting-the-standard-image-size-values-to-0-in-the-theme-settings-the-values-9999-are-assigned-in-the-code/5998/6 "2021-12-07T11:59:36Z")

</div>

And then if I manually delete all the `functions_backup.php` and `functions.php` files, and then re-execute the command `Wordpress -> Regenerate functions.php...`, the `functions.php` file will no longer be created and exported to the theme folder even if I press ^S and ^W
