1# Version Compatibility Adaptation 2 3 4As you incorporate new features into service widgets of your applications, take measures to avoid abnormal display of these features on earlier versions. You can specify the minimum SDK version in the service widget project so that service widgets incorporating new features will not be installed on incompatible systems. You can also follow the instructions in this section to implement forward compatibility during your service widget development. 5 6Configure forward compatibility in the JSON configuration file. Specifically, set the **apiVersion** attribute, which is at the same level as the **data** and **actions** fields in the service widget configuration file. The content defined in **apiVersion** overwrites the original content in **data** based on the current version information. 7 8 9Example: 10 11Assume that the JS service widget framework supports WebP image sources since API version 9. Then you can implement forward compatibility as follows: 12 13```html 14<!-- xxx.hml --> 15<div> 16 <image src="{{imageSrc}}" style="width: 100px;height: 100px;"></image> 17</div> 18``` 19 20JSON configuration file: 21 22```json 23{ 24 "data": { 25 "imageSrc": "defaultSrc.png" 26 }, 27 "apiVersion": { 28 "9": { 29 "imageSrc": "newSrc.webp" 30 } 31 } 32} 33``` 34 35The JS service widget development framework selects the most appropriate data based on the application configuration and the current API version. 36 37If the API version is 8 or earlier, the value of **imageSrc** is **defaultSrc.png**. 38 39If the API version is 9, the value of **imageSrc** is **newSrc.webp**. 40